Skip to content

Commit e1fceaf

Browse files
committed
with FS access, default HashMap should work on macOS
1 parent 3fe92f8 commit e1fceaf

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tests/run-pass/hashmap.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// macOS needs FS access for its HashMap:
2+
// compile-flags: -Zmiri-disable-isolation
3+
14
use std::collections::{self, HashMap};
25
use std::hash::{BuildHasherDefault, BuildHasher};
36

@@ -18,14 +21,8 @@ fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
1821
assert_eq!(map.values().fold(0, |x, y| x+y), num*(num-1)/2);
1922

2023
// TODO: Test Entry API, Iterators, ...
21-
2224
}
2325

2426
fn main() {
25-
if cfg!(target_os = "macos") { // TODO: Implement libstd HashMap seeding for macOS (https://github.com/rust-lang/miri/issues/686).
26-
// Until then, use a deterministic map.
27-
test_map::<BuildHasherDefault<collections::hash_map::DefaultHasher>>(HashMap::default());
28-
} else {
29-
test_map(HashMap::new());
30-
}
27+
test_map(HashMap::new());
3128
}

0 commit comments

Comments
 (0)