]> git.lizzy.rs Git - rust.git/commitdiff
Allow simd_insert and simd_extract in const_fn
authorgnzlbg <gonzalobg88@gmail.com>
Wed, 25 Sep 2019 08:28:53 +0000 (10:28 +0200)
committergnzlbg <gonzalobg88@gmail.com>
Wed, 25 Sep 2019 08:28:53 +0000 (10:28 +0200)
src/librustc_mir/transform/qualify_consts.rs
src/test/ui/consts/const-eval/simd/insert_extract-fail.rs
src/test/ui/consts/const-eval/simd/insert_extract.rs
src/test/ui/consts/const-eval/simd/insert_extract.stderr [deleted file]

index 795721f3b3f28637a1fd308ca3f6503ead91764a..8a6dcd1d2b476f2cce48af9e796c864701ad0f0b 100644 (file)
@@ -557,6 +557,8 @@ fn in_call(
                             | "saturating_add"
                             | "saturating_sub"
                             | "transmute"
+                            | "simd_insert"
+                            | "simd_extract"
                             => return true,
 
                             _ => {}
index 20c839a81a04e59d7726122e5f26c9aa0d6c82ed..bbfae997e724196bc0bb5ae5a6137219a895d3b9 100644 (file)
@@ -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)]
index 136965bf68abf9d1b94f2bca89bc28d0470f774b..d3462d802ea4e9c6fd666edabea7d54baac0b13b 100644 (file)
@@ -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 (file)
index 8975241..0000000
+++ /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)
-