about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-11 06:10:41 +0000
committerbors <bors@rust-lang.org>2025-05-11 06:10:41 +0000
commit9a7e19f2b66c472811b4bff02695c7a03f3f4151 (patch)
tree8f1caf593cc0e0f1ca27184577754db400020fbd
parentfd6626d7b8dfb04df3b7117d8977a22a1453f1c8 (diff)
parent4a662c25dc0715a2ab5ef91dfb8cb869d1ae0d7c (diff)
downloadrust-9a7e19f2b66c472811b4bff02695c7a03f3f4151.tar.gz
rust-9a7e19f2b66c472811b4bff02695c7a03f3f4151.zip
Auto merge of #135015 - heiher:stabilize-loongarch-target-features, r=Amanieu
Partially stabilize LoongArch target features

Stabilization PR for the LoongArch target features. This PR stabilizes some of the target features tracked by #44839.

Specifically, this PR stabilizes the following target features:

* f
* d
* frecipe
* lasx
* lbt
* lsx
* lvz

Docs PR: https://github.com/rust-lang/reference/pull/1707

r? `@Amanieu`
-rw-r--r--compiler/rustc_target/src/target_features.rs14
-rw-r--r--tests/ui/target-feature/abi-required-target-feature-flag-disable.loongarch.stderr6
-rw-r--r--tests/ui/target-feature/abi-required-target-feature-flag-disable.rs2
3 files changed, 9 insertions, 13 deletions
diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs
index 5a21925ba04..5428aa4cf70 100644
--- a/compiler/rustc_target/src/target_features.rs
+++ b/compiler/rustc_target/src/target_features.rs
@@ -693,17 +693,17 @@ static CSKY_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
 
 static LOONGARCH_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
     // tidy-alphabetical-start
-    ("d", Unstable(sym::loongarch_target_feature), &["f"]),
+    ("d", Stable, &["f"]),
     ("div32", Unstable(sym::loongarch_target_feature), &[]),
-    ("f", Unstable(sym::loongarch_target_feature), &[]),
-    ("frecipe", Unstable(sym::loongarch_target_feature), &[]),
+    ("f", Stable, &[]),
+    ("frecipe", Stable, &[]),
     ("lam-bh", Unstable(sym::loongarch_target_feature), &[]),
     ("lamcas", Unstable(sym::loongarch_target_feature), &[]),
-    ("lasx", Unstable(sym::loongarch_target_feature), &["lsx"]),
-    ("lbt", Unstable(sym::loongarch_target_feature), &[]),
+    ("lasx", Stable, &["lsx"]),
+    ("lbt", Stable, &[]),
     ("ld-seq-sa", Unstable(sym::loongarch_target_feature), &[]),
-    ("lsx", Unstable(sym::loongarch_target_feature), &["d"]),
-    ("lvz", Unstable(sym::loongarch_target_feature), &[]),
+    ("lsx", Stable, &["d"]),
+    ("lvz", Stable, &[]),
     ("relax", Unstable(sym::loongarch_target_feature), &[]),
     ("scq", Unstable(sym::loongarch_target_feature), &[]),
     ("ual", Unstable(sym::loongarch_target_feature), &[]),
diff --git a/tests/ui/target-feature/abi-required-target-feature-flag-disable.loongarch.stderr b/tests/ui/target-feature/abi-required-target-feature-flag-disable.loongarch.stderr
index 35102e0571f..a69544a34c9 100644
--- a/tests/ui/target-feature/abi-required-target-feature-flag-disable.loongarch.stderr
+++ b/tests/ui/target-feature/abi-required-target-feature-flag-disable.loongarch.stderr
@@ -3,9 +3,5 @@ warning: target feature `d` must be enabled to ensure that the ABI of the curren
    = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344>
 
-warning: unstable feature specified for `-Ctarget-feature`: `d`
-   |
-   = note: this feature is not stably supported; its behavior can change in the future
-
-warning: 2 warnings emitted
+warning: 1 warning emitted
 
diff --git a/tests/ui/target-feature/abi-required-target-feature-flag-disable.rs b/tests/ui/target-feature/abi-required-target-feature-flag-disable.rs
index c3ce05baa64..98723e99c36 100644
--- a/tests/ui/target-feature/abi-required-target-feature-flag-disable.rs
+++ b/tests/ui/target-feature/abi-required-target-feature-flag-disable.rs
@@ -24,4 +24,4 @@
 pub trait Sized {}
 
 //~? WARN must be enabled to ensure that the ABI of the current target can be implemented correctly
-//[x86,riscv,loongarch]~? WARN unstable feature specified for `-Ctarget-feature`
+//[x86,riscv]~? WARN unstable feature specified for `-Ctarget-feature`