From: Dylan MacKenzie Date: Wed, 13 Nov 2019 20:50:41 +0000 (-0800) Subject: Silence miri unleashed warnings in test X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=8f5494b470db3abb0506d3693ca0c9f6b42c4cde;p=rust.git Silence miri unleashed warnings in test --- diff --git a/src/test/ui/consts/miri_unleashed/enum_discriminants.rs b/src/test/ui/consts/miri_unleashed/enum_discriminants.rs index d7cdb0babc5..76d62f069f3 100644 --- a/src/test/ui/consts/miri_unleashed/enum_discriminants.rs +++ b/src/test/ui/consts/miri_unleashed/enum_discriminants.rs @@ -1,6 +1,9 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +// compile-flags: -Zunleash-the-miri-inside-of-you -Awarnings // run-pass +// miri unleashed warnings are not useful and change frequently, so they are silenced above. +#![feature(const_panic)] + //! Make sure that we read and write enum discriminants correctly for corner cases caused //! by layout optimizations. @@ -21,7 +24,7 @@ enum Foo { } let x = Foo::B; - match x { //~ WARNING skipping const checks + match x { Foo::B => 0, _ => panic!(), } @@ -86,21 +89,17 @@ pub enum E2 { } if let E1::V2 { .. } = (E1::V1 { f: true }) { - //~^ 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:: { - //~^ WARNING skipping const checks unreachable!() } if let E2::V3 { .. } = E2::V3:: { - //~^ WARNING skipping const checks } else { unreachable!() } diff --git a/src/test/ui/consts/miri_unleashed/enum_discriminants.stderr b/src/test/ui/consts/miri_unleashed/enum_discriminants.stderr deleted file mode 100644 index b7fce223af8..00000000000 --- a/src/test/ui/consts/miri_unleashed/enum_discriminants.stderr +++ /dev/null @@ -1,47 +0,0 @@ -warning: skipping const checks - --> $DIR/enum_discriminants.rs:24:5 - | -LL | / match x { -LL | | Foo::B => 0, -LL | | _ => panic!(), -LL | | } - | |_____^ - -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: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:98:5 - | -LL | / if let E2::V1 { .. } = E2::V3:: { -LL | | -LL | | unreachable!() -LL | | } - | |_____^ - -warning: skipping const checks - --> $DIR/enum_discriminants.rs:102:5 - | -LL | / if let E2::V3 { .. } = E2::V3:: { -LL | | -LL | | } else { -LL | | unreachable!() -LL | | } - | |_____^ -