mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
Auto merge of #1252 - RalfJung:rustup, r=RalfJung
bump Rust; HashMap should now work on macOS even with isolation
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
38114ff16e7856f98b2b4be7ab4cd29b38bed59a
|
||||
8ff785011be6625e32afceee3a08e5cff7470feb
|
||||
|
||||
@@ -98,13 +98,6 @@ fn emulate_foreign_item_by_name(
|
||||
this.write_scalar(this.machine.argv.expect("machine must be initialized"), dest)?;
|
||||
}
|
||||
|
||||
"SecRandomCopyBytes" => {
|
||||
let len = this.read_scalar(args[1])?.to_machine_usize(this)?;
|
||||
let ptr = this.read_scalar(args[2])?.not_undef()?;
|
||||
this.gen_random(ptr, len)?;
|
||||
this.write_null(dest)?;
|
||||
}
|
||||
|
||||
_ => throw_unsup_format!("can't call foreign function: {}", link_name),
|
||||
};
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
// macOS needs FS access for its HashMap:
|
||||
// compile-flags: -Zmiri-disable-isolation
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::hash::BuildHasher;
|
||||
|
||||
fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
|
||||
fn smoketest_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
|
||||
map.insert(0, 0);
|
||||
assert_eq!(map.values().fold(0, |x, y| x+y), 0);
|
||||
|
||||
@@ -19,10 +16,9 @@ fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
|
||||
map.insert(i, num-1-i);
|
||||
}
|
||||
assert_eq!(map.values().fold(0, |x, y| x+y), num*(num-1)/2);
|
||||
|
||||
// TODO: Test Entry API, Iterators, ...
|
||||
}
|
||||
|
||||
fn main() {
|
||||
test_map(HashMap::new());
|
||||
// hashbrown uses Miri on its own CI; we just do a smoketest here.
|
||||
smoketest_map(HashMap::new());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user