Skip to content

Commit 5e048da

Browse files
Bless miri unleashed test now that errors are mandatory
1 parent 86734b1 commit 5e048da

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const OVERFLOW: usize = {
2020
C(WithWraparoundInvalidValues),
2121
}
2222

23-
let x = Foo::B; //~ WARNING skipping const checks
24-
match x {
25-
Foo::B => 0, //~ WARNING skipping const checks
23+
let x = Foo::B;
24+
match x { //~ WARNING skipping const checks
25+
Foo::B => 0,
2626
_ => panic!(),
2727
}
2828
};
@@ -87,18 +87,20 @@ const MORE_OVERFLOW: usize = {
8787

8888
if let E1::V2 { .. } = (E1::V1 { f: true }) {
8989
//~^ WARNING skipping const checks
90-
//~| WARNING skipping const checks
9190
unreachable!()
9291
}
9392
if let E1::V1 { .. } = (E1::V1 { f: true }) {
93+
//~^ WARNING skipping const checks
9494
} else {
9595
unreachable!()
9696
}
9797

9898
if let E2::V1 { .. } = E2::V3::<Infallible> {
99+
//~^ WARNING skipping const checks
99100
unreachable!()
100101
}
101102
if let E2::V3 { .. } = E2::V3::<Infallible> {
103+
//~^ WARNING skipping const checks
102104
} else {
103105
unreachable!()
104106
}

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

+7-3
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,35 @@ warning: skipping const checks
1111
--> $DIR/enum_discriminants.rs:88:5
1212
|
1313
LL | / if let E1::V2 { .. } = (E1::V1 { f: true }) {
14+
LL | |
1415
LL | | unreachable!()
1516
LL | | }
1617
| |_____^
1718

1819
warning: skipping const checks
19-
--> $DIR/enum_discriminants.rs:91:5
20+
--> $DIR/enum_discriminants.rs:92:5
2021
|
2122
LL | / if let E1::V1 { .. } = (E1::V1 { f: true }) {
23+
LL | |
2224
LL | | } else {
2325
LL | | unreachable!()
2426
LL | | }
2527
| |_____^
2628

2729
warning: skipping const checks
28-
--> $DIR/enum_discriminants.rs:96:5
30+
--> $DIR/enum_discriminants.rs:98:5
2931
|
3032
LL | / if let E2::V1 { .. } = E2::V3::<Infallible> {
33+
LL | |
3134
LL | | unreachable!()
3235
LL | | }
3336
| |_____^
3437

3538
warning: skipping const checks
36-
--> $DIR/enum_discriminants.rs:99:5
39+
--> $DIR/enum_discriminants.rs:102:5
3740
|
3841
LL | / if let E2::V3 { .. } = E2::V3::<Infallible> {
42+
LL | |
3943
LL | | } else {
4044
LL | | unreachable!()
4145
LL | | }

0 commit comments

Comments
 (0)