@@ -166,7 +166,7 @@ fn test_join_for_different_lengths_with_long_separator() {
166
166
}
167
167
168
168
#[ test]
169
- #[ cfg ( not ( miri) ) ] // Miri is too slow
169
+ #[ cfg_attr ( miri, ignore ) ] // Miri is too slow
170
170
fn test_unsafe_slice ( ) {
171
171
assert_eq ! ( "ab" , unsafe { "abc" . get_unchecked( 0 ..2 ) } ) ;
172
172
assert_eq ! ( "bc" , unsafe { "abc" . get_unchecked( 1 ..3 ) } ) ;
@@ -483,8 +483,8 @@ mod slice_index {
483
483
}
484
484
485
485
#[ test]
486
- #[ cfg ( not ( target_os = "emscripten" ) ) ] // hits an OOM
487
- #[ cfg ( not ( miri) ) ] // Miri is too slow
486
+ #[ cfg_attr ( target_os = "emscripten" , ignore ) ] // hits an OOM
487
+ #[ cfg_attr ( miri, ignore ) ] // Miri is too slow
488
488
fn simple_big ( ) {
489
489
fn a_million_letter_x ( ) -> String {
490
490
let mut i = 0 ;
@@ -1069,7 +1069,7 @@ fn test_rev_iterator() {
1069
1069
}
1070
1070
1071
1071
#[ test]
1072
- #[ cfg ( not ( miri) ) ] // Miri is too slow
1072
+ #[ cfg_attr ( miri, ignore ) ] // Miri is too slow
1073
1073
fn test_chars_decoding ( ) {
1074
1074
let mut bytes = [ 0 ; 4 ] ;
1075
1075
for c in ( 0 ..0x110000 ) . filter_map ( std:: char:: from_u32) {
@@ -1081,7 +1081,7 @@ fn test_chars_decoding() {
1081
1081
}
1082
1082
1083
1083
#[ test]
1084
- #[ cfg ( not ( miri) ) ] // Miri is too slow
1084
+ #[ cfg_attr ( miri, ignore ) ] // Miri is too slow
1085
1085
fn test_chars_rev_decoding ( ) {
1086
1086
let mut bytes = [ 0 ; 4 ] ;
1087
1087
for c in ( 0 ..0x110000 ) . filter_map ( std:: char:: from_u32) {
@@ -1380,7 +1380,6 @@ fn test_bool_from_str() {
1380
1380
assert_eq ! ( "not even a boolean" . parse:: <bool >( ) . ok( ) , None ) ;
1381
1381
}
1382
1382
1383
- #[ cfg( not( miri) ) ] // Miri is too slow
1384
1383
fn check_contains_all_substrings ( s : & str ) {
1385
1384
assert ! ( s. contains( "" ) ) ;
1386
1385
for i in 0 ..s. len ( ) {
@@ -1391,7 +1390,7 @@ fn check_contains_all_substrings(s: &str) {
1391
1390
}
1392
1391
1393
1392
#[ test]
1394
- #[ cfg ( not ( miri) ) ] // Miri is too slow
1393
+ #[ cfg_attr ( miri, ignore ) ] // Miri is too slow
1395
1394
fn strslice_issue_16589 ( ) {
1396
1395
assert ! ( "bananas" . contains( "nana" ) ) ;
1397
1396
@@ -1408,7 +1407,7 @@ fn strslice_issue_16878() {
1408
1407
1409
1408
1410
1409
#[ test]
1411
- #[ cfg ( not ( miri) ) ] // Miri is too slow
1410
+ #[ cfg_attr ( miri, ignore ) ] // Miri is too slow
1412
1411
fn test_strslice_contains ( ) {
1413
1412
let x = "There are moments, Jeeves, when one asks oneself, 'Do trousers matter?'" ;
1414
1413
check_contains_all_substrings ( x) ;
0 commit comments