@@ -2513,10 +2513,11 @@ mod test_map {
2513
2513
use super :: DefaultHashBuilder ;
2514
2514
use super :: Entry :: { Occupied , Vacant } ;
2515
2515
use super :: HashMap ;
2516
- use rand:: { thread_rng , Rng } ;
2516
+ use rand:: { rngs :: SmallRng , Rng , SeedableRng } ;
2517
2517
use std:: cell:: RefCell ;
2518
2518
use std:: usize;
2519
2519
use std:: vec:: Vec ;
2520
+ #[ cfg( not( miri) ) ]
2520
2521
use CollectionAllocErr :: * ;
2521
2522
2522
2523
#[ test]
@@ -2770,6 +2771,7 @@ mod test_map {
2770
2771
}
2771
2772
2772
2773
#[ test]
2774
+ #[ cfg( not( miri) ) ] // FIXME: https://github.com/rust-lang/miri/issues/654
2773
2775
fn test_lots_of_insertions ( ) {
2774
2776
let mut m = HashMap :: new ( ) ;
2775
2777
@@ -3191,6 +3193,7 @@ mod test_map {
3191
3193
3192
3194
#[ test]
3193
3195
#[ should_panic]
3196
+ #[ cfg( not( miri) ) ] // FIXME: https://github.com/rust-lang/miri/issues/636
3194
3197
fn test_index_nonexistent ( ) {
3195
3198
let mut map = HashMap :: new ( ) ;
3196
3199
@@ -3262,7 +3265,12 @@ mod test_map {
3262
3265
}
3263
3266
3264
3267
let mut m = HashMap :: new ( ) ;
3265
- let mut rng = thread_rng ( ) ;
3268
+
3269
+ // FIXME: https://github.com/rust-lang/miri/issues/653
3270
+ let mut rng = {
3271
+ let seed = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 ] ;
3272
+ SmallRng :: from_seed ( seed)
3273
+ } ;
3266
3274
3267
3275
// Populate the map with some items.
3268
3276
for _ in 0 ..50 {
@@ -3372,6 +3380,7 @@ mod test_map {
3372
3380
}
3373
3381
3374
3382
#[ test]
3383
+ #[ cfg( not( miri) ) ] // FIXME: https://github.com/rust-lang/miri/issues/655
3375
3384
fn test_try_reserve ( ) {
3376
3385
let mut empty_bytes: HashMap < u8 , u8 > = HashMap :: new ( ) ;
3377
3386
0 commit comments