Skip to content

Commit aaa16a5

Browse files
committed
Auto merge of #1252 - RalfJung:rustup, r=RalfJung
bump Rust; HashMap should now work on macOS even with isolation
2 parents 9fe39ba + b4b8750 commit aaa16a5

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
38114ff16e7856f98b2b4be7ab4cd29b38bed59a
1+
8ff785011be6625e32afceee3a08e5cff7470feb

src/shims/foreign_items/posix/macos.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
9898
this.write_scalar(this.machine.argv.expect("machine must be initialized"), dest)?;
9999
}
100100

101-
"SecRandomCopyBytes" => {
102-
let len = this.read_scalar(args[1])?.to_machine_usize(this)?;
103-
let ptr = this.read_scalar(args[2])?.not_undef()?;
104-
this.gen_random(ptr, len)?;
105-
this.write_null(dest)?;
106-
}
107-
108101
_ => throw_unsup_format!("can't call foreign function: {}", link_name),
109102
};
110103

tests/run-pass/hashmap.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
// macOS needs FS access for its HashMap:
2-
// compile-flags: -Zmiri-disable-isolation
3-
41
use std::collections::HashMap;
52
use std::hash::BuildHasher;
63

7-
fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
4+
fn smoketest_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
85
map.insert(0, 0);
96
assert_eq!(map.values().fold(0, |x, y| x+y), 0);
107

@@ -19,10 +16,9 @@ fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
1916
map.insert(i, num-1-i);
2017
}
2118
assert_eq!(map.values().fold(0, |x, y| x+y), num*(num-1)/2);
22-
23-
// TODO: Test Entry API, Iterators, ...
2419
}
2520

2621
fn main() {
27-
test_map(HashMap::new());
22+
// hashbrown uses Miri on its own CI; we just do a smoketest here.
23+
smoketest_map(HashMap::new());
2824
}

0 commit comments

Comments
 (0)