From 8f5494b470db3abb0506d3693ca0c9f6b42c4cde Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Wed, 13 Nov 2019 12:50:41 -0800 Subject: [PATCH] Silence miri unleashed warnings in test --- .../miri_unleashed/enum_discriminants.rs | 11 ++--- .../miri_unleashed/enum_discriminants.stderr | 47 ------------------- 2 files changed, 5 insertions(+), 53 deletions(-) delete mode 100644 src/test/ui/consts/miri_unleashed/enum_discriminants.stderr 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 | | } - | |_____^ - -- 2.44.0