diff --git a/src/librustc_mir/transform/qualify_consts.rs b/src/librustc_mir/transform/qualify_consts.rs index 795721f3b3f28..8a6dcd1d2b476 100644 --- a/src/librustc_mir/transform/qualify_consts.rs +++ b/src/librustc_mir/transform/qualify_consts.rs @@ -557,6 +557,8 @@ impl Qualif for IsNotPromotable { | "saturating_add" | "saturating_sub" | "transmute" + | "simd_insert" + | "simd_extract" => return true, _ => {} diff --git a/src/test/ui/consts/const-eval/simd/insert_extract-fail.rs b/src/test/ui/consts/const-eval/simd/insert_extract-fail.rs index 20c839a81a04e..bbfae997e7241 100644 --- a/src/test/ui/consts/const-eval/simd/insert_extract-fail.rs +++ b/src/test/ui/consts/const-eval/simd/insert_extract-fail.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +#![feature(const_fn)] #![feature(repr_simd)] #![feature(platform_intrinsics)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/consts/const-eval/simd/insert_extract.rs b/src/test/ui/consts/const-eval/simd/insert_extract.rs index 136965bf68abf..d3462d802ea4e 100644 --- a/src/test/ui/consts/const-eval/simd/insert_extract.rs +++ b/src/test/ui/consts/const-eval/simd/insert_extract.rs @@ -1,5 +1,5 @@ // run-pass -// compile-flags: -Zunleash-the-miri-inside-of-you +#![feature(const_fn)] #![feature(repr_simd)] #![feature(platform_intrinsics)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/consts/const-eval/simd/insert_extract.stderr b/src/test/ui/consts/const-eval/simd/insert_extract.stderr deleted file mode 100644 index 8975241403e74..0000000000000 --- a/src/test/ui/consts/const-eval/simd/insert_extract.stderr +++ /dev/null @@ -1,288 +0,0 @@ -warning: skipping const checks - --> $DIR/insert_extract.rs:22:9 - | -LL | assert_eq!(X0, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:22:9 - | -LL | assert_eq!(X0, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:22:9 - | -LL | assert_eq!(X0, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:23:9 - | -LL | assert_eq!(Y0, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:23:9 - | -LL | assert_eq!(Y0, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:23:9 - | -LL | assert_eq!(Y0, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:32:9 - | -LL | assert_eq!(X0, 13); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:32:9 - | -LL | assert_eq!(X0, 13); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:32:9 - | -LL | assert_eq!(X0, 13); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:33:9 - | -LL | assert_eq!(X1, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:33:9 - | -LL | assert_eq!(X1, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:33:9 - | -LL | assert_eq!(X1, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:34:9 - | -LL | assert_eq!(Y0, 13); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:34:9 - | -LL | assert_eq!(Y0, 13); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:34:9 - | -LL | assert_eq!(Y0, 13); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:35:9 - | -LL | assert_eq!(Y1, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:35:9 - | -LL | assert_eq!(Y1, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:35:9 - | -LL | assert_eq!(Y1, 42); - | ^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:46:9 - | -LL | assert_eq!(X0, 13.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:46:9 - | -LL | assert_eq!(X0, 13.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:46:9 - | -LL | assert_eq!(X0, 13.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:47:9 - | -LL | assert_eq!(X1, 42.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:47:9 - | -LL | assert_eq!(X1, 42.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:47:9 - | -LL | assert_eq!(X1, 42.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:48:9 - | -LL | assert_eq!(X2, 15.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:48:9 - | -LL | assert_eq!(X2, 15.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:48:9 - | -LL | assert_eq!(X2, 15.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:49:9 - | -LL | assert_eq!(Y0, 13.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:49:9 - | -LL | assert_eq!(Y0, 13.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:49:9 - | -LL | assert_eq!(Y0, 13.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:50:9 - | -LL | assert_eq!(Y1, 42.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:50:9 - | -LL | assert_eq!(Y1, 42.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:50:9 - | -LL | assert_eq!(Y1, 42.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:51:9 - | -LL | assert_eq!(Y2, 15.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:51:9 - | -LL | assert_eq!(Y2, 15.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -warning: skipping const checks - --> $DIR/insert_extract.rs:51:9 - | -LL | assert_eq!(Y2, 15.); - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) -