diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2018-12-19 11:47:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-19 11:47:13 +0100 |
| commit | 2e5a025d443dbefbdb82053112b447ce998d2ab0 (patch) | |
| tree | 821b28c0624566abd1cd140239ce43857aba1213 | |
| parent | 39dc2c4e34f16fdd9d15a89cfc9d82ed60c67b17 (diff) | |
| parent | a0b766d584f2ddcc41022fef271b00ebdda0ba77 (diff) | |
| download | rust-2e5a025d443dbefbdb82053112b447ce998d2ab0.tar.gz rust-2e5a025d443dbefbdb82053112b447ce998d2ab0.zip | |
Rollup merge of #56908 - alexcrichton:new-features, r=oli-obk
rustc: Don't ICE on usage of two new target features I seem to always forget to update this portion of the compiler...
| -rw-r--r-- | src/librustc_typeck/collect.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/target-feature-gate.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/target-feature-gate.stderr | 2 |
4 files changed, 8 insertions, 1 deletions
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 3b8b6d47d91..a4eafee36d1 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -2207,6 +2207,8 @@ fn from_target_feature( Some("sse4a_target_feature") => rust_features.sse4a_target_feature, Some("tbm_target_feature") => rust_features.tbm_target_feature, Some("wasm_target_feature") => rust_features.wasm_target_feature, + Some("cmpxchg16b_target_feature") => rust_features.cmpxchg16b_target_feature, + Some("adx_target_feature") => rust_features.adx_target_feature, Some(name) => bug!("unknown target feature gate {}", name), None => true, }; diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 4eca0c942f3..844f49fe842 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -417,6 +417,8 @@ declare_features! ( (active, sse4a_target_feature, "1.27.0", Some(44839), None), (active, tbm_target_feature, "1.27.0", Some(44839), None), (active, wasm_target_feature, "1.30.0", Some(44839), None), + (active, adx_target_feature, "1.32.0", Some(44839), None), + (active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None), // Allows macro invocations on modules expressions and statements and // procedural macros to expand to non-items. diff --git a/src/test/ui/target-feature-gate.rs b/src/test/ui/target-feature-gate.rs index 2d0fb78897d..4207a3285c4 100644 --- a/src/test/ui/target-feature-gate.rs +++ b/src/test/ui/target-feature-gate.rs @@ -24,6 +24,9 @@ // gate-test-mips_target_feature // gate-test-mmx_target_feature // gate-test-wasm_target_feature +// gate-test-adx_target_feature +// gate-test-cmpxchg16b_target_feature +// min-llvm-version 6.0 #[target_feature(enable = "avx512bw")] //~^ ERROR: currently unstable diff --git a/src/test/ui/target-feature-gate.stderr b/src/test/ui/target-feature-gate.stderr index 24141d0064f..54589536010 100644 --- a/src/test/ui/target-feature-gate.stderr +++ b/src/test/ui/target-feature-gate.stderr @@ -1,5 +1,5 @@ error[E0658]: the target feature `avx512bw` is currently unstable (see issue #44839) - --> $DIR/target-feature-gate.rs:28:18 + --> $DIR/target-feature-gate.rs:31:18 | LL | #[target_feature(enable = "avx512bw")] | ^^^^^^^^^^^^^^^^^^^ |
