Skip to content

Commit 8f5494b

Browse files
Silence miri unleashed warnings in test
1 parent c8156b9 commit 8f5494b

File tree

2 files changed

+5
-53
lines changed

2 files changed

+5
-53
lines changed

src/test/ui/consts/miri_unleashed/enum_discriminants.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
// compile-flags: -Zunleash-the-miri-inside-of-you
1+
// compile-flags: -Zunleash-the-miri-inside-of-you -Awarnings
22
// run-pass
33

4+
// miri unleashed warnings are not useful and change frequently, so they are silenced above.
5+
#![feature(const_panic)]
6+
47
//! Make sure that we read and write enum discriminants correctly for corner cases caused
58
//! by layout optimizations.
69
@@ -21,7 +24,7 @@ const OVERFLOW: usize = {
2124
}
2225

2326
let x = Foo::B;
24-
match x { //~ WARNING skipping const checks
27+
match x {
2528
Foo::B => 0,
2629
_ => panic!(),
2730
}
@@ -86,21 +89,17 @@ const MORE_OVERFLOW: usize = {
8689
}
8790

8891
if let E1::V2 { .. } = (E1::V1 { f: true }) {
89-
//~^ WARNING skipping const checks
9092
unreachable!()
9193
}
9294
if let E1::V1 { .. } = (E1::V1 { f: true }) {
93-
//~^ WARNING skipping const checks
9495
} else {
9596
unreachable!()
9697
}
9798

9899
if let E2::V1 { .. } = E2::V3::<Infallible> {
99-
//~^ WARNING skipping const checks
100100
unreachable!()
101101
}
102102
if let E2::V3 { .. } = E2::V3::<Infallible> {
103-
//~^ WARNING skipping const checks
104103
} else {
105104
unreachable!()
106105
}

src/test/ui/consts/miri_unleashed/enum_discriminants.stderr

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)