]> git.lizzy.rs Git - rust.git/commitdiff
Silence miri unleashed warnings in test
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Wed, 13 Nov 2019 20:50:41 +0000 (12:50 -0800)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 15 Nov 2019 18:33:52 +0000 (10:33 -0800)
src/test/ui/consts/miri_unleashed/enum_discriminants.rs
src/test/ui/consts/miri_unleashed/enum_discriminants.stderr [deleted file]

index d7cdb0babc5c5827699a2576eda83d833a1b28f1..76d62f069f37890bb45a10a74c09bceb83ed5477 100644 (file)
@@ -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<X> {
     }
 
     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::<Infallible> {
-        //~^ WARNING skipping const checks
         unreachable!()
     }
     if let E2::V3 { .. } = E2::V3::<Infallible> {
-        //~^ 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 (file)
index b7fce22..0000000
+++ /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::<Infallible> {
-LL | |
-LL | |         unreachable!()
-LL | |     }
-   | |_____^
-
-warning: skipping const checks
-  --> $DIR/enum_discriminants.rs:102:5
-   |
-LL | /     if let E2::V3 { .. } = E2::V3::<Infallible> {
-LL | |
-LL | |     } else {
-LL | |         unreachable!()
-LL | |     }
-   | |_____^
-