Skip to content

Commit

Permalink
Bless miri unleashed test now that errors are mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Nov 13, 2019
1 parent 86734b1 commit 5e048da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 6 additions & 4 deletions src/test/ui/consts/miri_unleashed/enum_discriminants.rs
Expand Up @@ -20,9 +20,9 @@ const OVERFLOW: usize = {
C(WithWraparoundInvalidValues),
}

let x = Foo::B; //~ WARNING skipping const checks
match x {
Foo::B => 0, //~ WARNING skipping const checks
let x = Foo::B;
match x { //~ WARNING skipping const checks
Foo::B => 0,
_ => panic!(),
}
};
Expand Down Expand Up @@ -87,18 +87,20 @@ const MORE_OVERFLOW: usize = {

if let E1::V2 { .. } = (E1::V1 { f: true }) {
//~^ WARNING skipping const checks
//~| WARNING skipping const checks
unreachable!()
}
if let E1::V1 { .. } = (E1::V1 { f: true }) {
//~^ WARNING skipping const checks
} else {
unreachable!()
}

if let E2::V1 { .. } = E2::V3::<Infallible> {
//~^ WARNING skipping const checks
unreachable!()
}
if let E2::V3 { .. } = E2::V3::<Infallible> {
//~^ WARNING skipping const checks
} else {
unreachable!()
}
Expand Down
10 changes: 7 additions & 3 deletions src/test/ui/consts/miri_unleashed/enum_discriminants.stderr
Expand Up @@ -11,31 +11,35 @@ warning: skipping const checks
--> $DIR/enum_discriminants.rs:88:5
|
LL | / if let E1::V2 { .. } = (E1::V1 { f: true }) {
LL | |
LL | | unreachable!()
LL | | }
| |_____^

warning: skipping const checks
--> $DIR/enum_discriminants.rs:91:5
--> $DIR/enum_discriminants.rs:92:5
|
LL | / if let E1::V1 { .. } = (E1::V1 { f: true }) {
LL | |
LL | | } else {
LL | | unreachable!()
LL | | }
| |_____^

warning: skipping const checks
--> $DIR/enum_discriminants.rs:96:5
--> $DIR/enum_discriminants.rs:98:5
|
LL | / if let E2::V1 { .. } = E2::V3::<Infallible> {
LL | |
LL | | unreachable!()
LL | | }
| |_____^

warning: skipping const checks
--> $DIR/enum_discriminants.rs:99:5
--> $DIR/enum_discriminants.rs:102:5
|
LL | / if let E2::V3 { .. } = E2::V3::<Infallible> {
LL | |
LL | | } else {
LL | | unreachable!()
LL | | }
Expand Down

0 comments on commit 5e048da

Please sign in to comment.