From: Ralf Jung Date: Mon, 23 Mar 2020 09:34:15 +0000 (+0100) Subject: bump Rust; HashMap should now work on macOS even with isolation X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b4b8750e447058e06e8bf5ad38645ee05a81ef42;p=rust.git bump Rust; HashMap should now work on macOS even with isolation --- diff --git a/rust-version b/rust-version index 29c1f3a2a83..70ece06e4f0 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -38114ff16e7856f98b2b4be7ab4cd29b38bed59a +8ff785011be6625e32afceee3a08e5cff7470feb diff --git a/src/shims/foreign_items/posix/macos.rs b/src/shims/foreign_items/posix/macos.rs index 0bb4710769d..ee02effecd2 100644 --- a/src/shims/foreign_items/posix/macos.rs +++ b/src/shims/foreign_items/posix/macos.rs @@ -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), }; diff --git a/tests/run-pass/hashmap.rs b/tests/run-pass/hashmap.rs index 85116796d38..488fe6afe65 100644 --- a/tests/run-pass/hashmap.rs +++ b/tests/run-pass/hashmap.rs @@ -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(mut map: HashMap) { +fn smoketest_map(mut map: HashMap) { map.insert(0, 0); assert_eq!(map.values().fold(0, |x, y| x+y), 0); @@ -19,10 +16,9 @@ fn test_map(mut map: HashMap) { 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()); }