Skip to content

Commit 6f0fe55

Browse files
author
bors-servo
authored
Auto merge of #186 - RalfJung:miri, r=mbrubeck
Miri now supports catching panics Also fix a mistake in the .gitignore (at least on my system, this didn't actually ignore the lockfile)
2 parents c975415 + ddfa856 commit 6f0fe55

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
target
2-
./Cargo.lock
2+
/Cargo.lock

lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! When this feature is enabled, `smallvec` depends on `std`.
1616
//!
1717
//! To depend on `smallvec` without `libstd`, use `default-features = false` in the `smallvec`
18-
//! section of Cargo.toml to disable its `"std"` feature.
18+
//! section of Cargo.toml to disable its `"write"` feature.
1919
//!
2020
//! ## `union` feature
2121
//!
@@ -1984,7 +1984,6 @@ mod tests {
19841984
);
19851985
}
19861986

1987-
#[cfg(all(feature = "std", not(miri)))] // Miri currently does not support unwinding
19881987
#[test]
19891988
// https://github.com/servo/rust-smallvec/issues/96
19901989
fn test_insert_many_panic() {
@@ -2117,7 +2116,6 @@ mod tests {
21172116
assert!(c > b);
21182117
}
21192118

2120-
#[cfg(feature = "std")]
21212119
#[test]
21222120
fn test_hash() {
21232121
use std::collections::hash_map::DefaultHasher;
@@ -2381,10 +2379,10 @@ mod tests {
23812379
assert_eq!(v[..], [1, 0][..]);
23822380
}
23832381

2384-
#[cfg(feature = "std")]
2382+
#[cfg(feature = "write")]
23852383
#[test]
23862384
fn test_write() {
2387-
use io::Write;
2385+
use std::io::Write;
23882386

23892387
let data = [1, 2, 3, 4, 5];
23902388

scripts/run_miri.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ rustup default "$MIRI_NIGHTLY"
1616
rustup component add miri
1717
cargo miri setup
1818

19-
cargo miri test --verbose -- -- -Zunstable-options --exclude-should-panic
20-
cargo miri test --verbose --features union -- -- -Zunstable-options --exclude-should-panic
21-
cargo miri test --verbose --all-features -- -- -Zunstable-options --exclude-should-panic
19+
cargo miri test --verbose -- -Zmiri-ignore-leaks
20+
cargo miri test --verbose --features union -- -Zmiri-ignore-leaks
21+
cargo miri test --verbose --all-features -- -Zmiri-ignore-leaks

0 commit comments

Comments
 (0)