]> git.lizzy.rs Git - rust.git/commitdiff
bump Rust; HashMap should now work on macOS even with isolation
authorRalf Jung <post@ralfj.de>
Mon, 23 Mar 2020 09:34:15 +0000 (10:34 +0100)
committerRalf Jung <post@ralfj.de>
Mon, 23 Mar 2020 09:34:15 +0000 (10:34 +0100)
rust-version
src/shims/foreign_items/posix/macos.rs
tests/run-pass/hashmap.rs

index 29c1f3a2a83e0b4fd40b912a48f6c0532771ed14..70ece06e4f0269c00f915eeabec2ca66258eb150 100644 (file)
@@ -1 +1 @@
-38114ff16e7856f98b2b4be7ab4cd29b38bed59a
+8ff785011be6625e32afceee3a08e5cff7470feb
index 0bb4710769d977675359d73d55efc5b224c3535f..ee02effecd2c5e4712bf5094772cd6eaace67ddf 100644 (file)
@@ -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),
         };
 
index 85116796d3859b09c2645f720889cdc3a6c6a71a..488fe6afe65e642f856eea7e198d16a5aa52773c 100644 (file)
@@ -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());
 }