File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use alloc::task::{LocalWake, Wake};
4
4
use core:: task:: { LocalWaker , Waker } ;
5
5
6
6
#[ test]
7
- #[ cfg_attr( miri, should_panic ) ] // `will_wake` doesn't guarantee that this test will work, and indeed on Miri it fails
7
+ #[ cfg_attr( miri, ignore ) ] // `will_wake` doesn't guarantee that this test will work, and indeed on Miri it can fail
8
8
fn test_waker_will_wake_clone ( ) {
9
9
struct NoopWaker ;
10
10
@@ -20,7 +20,7 @@ fn test_waker_will_wake_clone() {
20
20
}
21
21
22
22
#[ test]
23
- #[ cfg_attr( miri, should_panic ) ] // `will_wake` doesn't guarantee that this test will work, and indeed on Miri it fails
23
+ #[ cfg_attr( miri, ignore ) ] // `will_wake` doesn't guarantee that this test will work, and indeed on Miri it can fail
24
24
fn test_local_waker_will_wake_clone ( ) {
25
25
struct NoopWaker ;
26
26
Original file line number Diff line number Diff line change @@ -810,9 +810,12 @@ fn ptr_metadata() {
810
810
assert_ne ! ( address_1, address_2) ;
811
811
// Different erased type => different vtable pointer
812
812
assert_ne ! ( address_2, address_3) ;
813
- // Same erased type and same trait => same vtable pointer
814
- assert_eq ! ( address_3, address_4) ;
815
- assert_eq ! ( address_3, address_5) ;
813
+ // Same erased type and same trait => same vtable pointer.
814
+ // This is *not guaranteed*, so we skip it in Miri.
815
+ if !cfg ! ( miri) {
816
+ assert_eq ! ( address_3, address_4) ;
817
+ assert_eq ! ( address_3, address_5) ;
818
+ }
816
819
}
817
820
}
818
821
You can’t perform that action at this time.
0 commit comments