about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsayantn <sayantn05@gmail.com>2025-07-28 00:05:24 +0530
committersayantn <sayantn05@gmail.com>2025-08-14 02:07:40 +0530
commit100d19ce5ba823faeb8b1ed6944b1047fe342de9 (patch)
treef5053223dc9442d529826039c7edc9182fefeb21
parentf5b8a11fecf23cb669f6d1feae81aafc2930aeb9 (diff)
downloadrust-100d19ce5ba823faeb8b1ed6944b1047fe342de9.tar.gz
rust-100d19ce5ba823faeb8b1ed6944b1047fe342de9.zip
Stabilize `sse4a` and `tbm` target features
 - remove some stabilized target features from `gate.rs`
-rw-r--r--compiler/rustc_feature/src/accepted.rs4
-rw-r--r--compiler/rustc_feature/src/unstable.rs2
-rw-r--r--compiler/rustc_target/src/target_features.rs4
-rw-r--r--library/core/src/lib.rs2
-rw-r--r--library/stdarch/crates/core_arch/src/lib.rs2
-rw-r--r--tests/ui/target-feature/gate.rs6
-rw-r--r--tests/ui/target-feature/gate.stderr2
7 files changed, 7 insertions, 15 deletions
diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs
index 83be3241b12..9fe55216f93 100644
--- a/compiler/rustc_feature/src/accepted.rs
+++ b/compiler/rustc_feature/src/accepted.rs
@@ -396,6 +396,8 @@ declare_features! (
     (accepted, slice_patterns, "1.42.0", Some(62254)),
     /// Allows use of `&foo[a..b]` as a slicing syntax.
     (accepted, slicing_syntax, "1.0.0", None),
+    /// Allows use of `sse4a` target feature.
+    (accepted, sse4a_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
     /// Allows elision of `'static` lifetimes in `static`s and `const`s.
     (accepted, static_in_const, "1.17.0", Some(35897)),
     /// Allows the definition recursive static items.
@@ -408,6 +410,8 @@ declare_features! (
     (accepted, target_feature, "1.27.0", None),
     /// Allows the use of `#[target_feature]` on safe functions.
     (accepted, target_feature_11, "1.86.0", Some(69098)),
+    /// Allows use of `tbm` target feature.
+    (accepted, tbm_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
     /// Allows `fn main()` with return types which implements `Termination` (RFC 1937).
     (accepted, termination_trait, "1.26.0", Some(43301)),
     /// Allows `#[test]` functions where the return type implements `Termination` (RFC 1937).
diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs
index acc21f6c6d2..87ecc7b41e2 100644
--- a/compiler/rustc_feature/src/unstable.rs
+++ b/compiler/rustc_feature/src/unstable.rs
@@ -334,8 +334,6 @@ declare_features! (
     (unstable, rtm_target_feature, "1.35.0", Some(44839)),
     (unstable, s390x_target_feature, "1.82.0", Some(44839)),
     (unstable, sparc_target_feature, "1.84.0", Some(132783)),
-    (unstable, sse4a_target_feature, "1.27.0", Some(44839)),
-    (unstable, tbm_target_feature, "1.27.0", Some(44839)),
     (unstable, wasm_target_feature, "1.30.0", Some(44839)),
     (unstable, x87_target_feature, "1.85.0", Some(44839)),
     // !!!!    !!!!    !!!!    !!!!   !!!!    !!!!    !!!!    !!!!    !!!!    !!!!    !!!!
diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs
index 297d9ed84c5..77726e9c555 100644
--- a/compiler/rustc_target/src/target_features.rs
+++ b/compiler/rustc_target/src/target_features.rs
@@ -471,9 +471,9 @@ static X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
     ("sse3", Stable, &["sse2"]),
     ("sse4.1", Stable, &["ssse3"]),
     ("sse4.2", Stable, &["sse4.1"]),
-    ("sse4a", Unstable(sym::sse4a_target_feature), &["sse3"]),
+    ("sse4a", Stable, &["sse3"]),
     ("ssse3", Stable, &["sse3"]),
-    ("tbm", Unstable(sym::tbm_target_feature), &[]),
+    ("tbm", Stable, &[]),
     ("vaes", Stable, &["avx2", "aes"]),
     ("vpclmulqdq", Stable, &["avx", "pclmulqdq"]),
     ("widekl", Stable, &["kl"]),
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index d5bce6ad233..a6825b4be68 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -200,8 +200,6 @@
 #![feature(riscv_target_feature)]
 #![feature(rtm_target_feature)]
 #![feature(s390x_target_feature)]
-#![feature(sse4a_target_feature)]
-#![feature(tbm_target_feature)]
 #![feature(wasm_target_feature)]
 #![feature(x86_amx_intrinsics)]
 // tidy-alphabetical-end
diff --git a/library/stdarch/crates/core_arch/src/lib.rs b/library/stdarch/crates/core_arch/src/lib.rs
index c58580f6417..7d3cbd55ad8 100644
--- a/library/stdarch/crates/core_arch/src/lib.rs
+++ b/library/stdarch/crates/core_arch/src/lib.rs
@@ -18,8 +18,6 @@
     rustc_attrs,
     staged_api,
     doc_cfg,
-    tbm_target_feature,
-    sse4a_target_feature,
     riscv_target_feature,
     arm_target_feature,
     mips_target_feature,
diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs
index 81ed8b3de76..fc3763820cb 100644
--- a/tests/ui/target-feature/gate.rs
+++ b/tests/ui/target-feature/gate.rs
@@ -1,18 +1,12 @@
 //@ only-x86_64
 //
-// gate-test-sse4a_target_feature
 // gate-test-powerpc_target_feature
-// gate-test-tbm_target_feature
 // gate-test-arm_target_feature
 // gate-test-hexagon_target_feature
 // gate-test-mips_target_feature
 // gate-test-nvptx_target_feature
 // gate-test-wasm_target_feature
-// gate-test-adx_target_feature
-// gate-test-cmpxchg16b_target_feature
-// gate-test-movbe_target_feature
 // gate-test-rtm_target_feature
-// gate-test-f16c_target_feature
 // gate-test-riscv_target_feature
 // gate-test-ermsb_target_feature
 // gate-test-bpf_target_feature
diff --git a/tests/ui/target-feature/gate.stderr b/tests/ui/target-feature/gate.stderr
index 3e9374be73d..345dc2006d0 100644
--- a/tests/ui/target-feature/gate.stderr
+++ b/tests/ui/target-feature/gate.stderr
@@ -1,5 +1,5 @@
 error[E0658]: the target feature `x87` is currently unstable
-  --> $DIR/gate.rs:30:18
+  --> $DIR/gate.rs:24:18
    |
 LL | #[target_feature(enable = "x87")]
    |                  ^^^^^^^^^^^^^^