]> git.lizzy.rs Git - rust.git/commitdiff
fix tests for latest Rust
authorRalf Jung <post@ralfj.de>
Wed, 1 May 2019 18:43:43 +0000 (20:43 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 1 May 2019 18:43:43 +0000 (20:43 +0200)
rust-version
tests/run-pass/async-fn.rs
tests/run-pass/hashmap.rs

index 52b6685715d7972a6e919d4570de2107cc814a2e..49e9739a2eb18e85469ac55c33b16927e6fa252b 100644 (file)
@@ -1 +1 @@
-fe0a415b4ba3310c2263f07e0253e2434310299c
+7c71bc3208031b1307573de45a3b3e18fa45787a
index 1608ea1888942834af37d87235973dd6b107c7fe..8a0ac875f54d62ada8ce3e0c44e643efb7259c8d 100644 (file)
@@ -1,7 +1,6 @@
 #![feature(
     async_await,
     await_macro,
-    futures_api,
 )]
 
 use std::{future::Future, pin::Pin, task::Poll, ptr};
index 25a816bcf2454df0d074259e3aaafcffe7ba43e6..55037f55bf048d7924fe9671ad3c8cf4d4d80cc9 100644 (file)
@@ -7,13 +7,10 @@ fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
     map.insert(0, 0);
     assert_eq!(map.values().fold(0, |x, y| x+y), 0);
 
-    let table_base = map.get(&0).unwrap() as *const _;
-
-    let num = 22; // large enough to trigger a resize
+    let num = 25;
     for i in 1..num {
         map.insert(i, i);
     }
-    assert!(table_base != map.get(&0).unwrap() as *const _); // make sure relocation happened
     assert_eq!(map.values().fold(0, |x, y| x+y), num*(num-1)/2); // check the right things are in the table now
 
     // Inserting again replaces the existing entries