From b08bf47606bbba0a966d6a722d85c740b315fcec Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 1 May 2019 20:43:43 +0200 Subject: [PATCH] fix tests for latest Rust --- rust-version | 2 +- tests/run-pass/async-fn.rs | 1 - tests/run-pass/hashmap.rs | 5 +---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/rust-version b/rust-version index 52b6685715d..49e9739a2eb 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -fe0a415b4ba3310c2263f07e0253e2434310299c +7c71bc3208031b1307573de45a3b3e18fa45787a diff --git a/tests/run-pass/async-fn.rs b/tests/run-pass/async-fn.rs index 1608ea18889..8a0ac875f54 100644 --- a/tests/run-pass/async-fn.rs +++ b/tests/run-pass/async-fn.rs @@ -1,7 +1,6 @@ #![feature( async_await, await_macro, - futures_api, )] use std::{future::Future, pin::Pin, task::Poll, ptr}; diff --git a/tests/run-pass/hashmap.rs b/tests/run-pass/hashmap.rs index 25a816bcf24..55037f55bf0 100644 --- a/tests/run-pass/hashmap.rs +++ b/tests/run-pass/hashmap.rs @@ -7,13 +7,10 @@ fn test_map(mut map: HashMap) { 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 -- 2.44.0