Skip to content

Commit e36401b

Browse files
committed
enable more tests in Miri and fix sue of 'std' feature
1 parent bb8ae2b commit e36401b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

0 commit comments

Comments
 (0)