diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index 776de1988ccdc..b42e1d10ee331 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -143,6 +143,8 @@ declare_features! ( /// As long as control flow is not implemented in const eval, `&&` and `||` may not be used /// at the same time as let bindings. (accepted, const_let, "1.33.0", Some(48821)), + /// Allows `#[target_feature(...)]` on loongarch64 platforms + (accepted, loongarch_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)), /// Allows the use of `loop` and `while` in constants. (accepted, const_loop, "1.46.0", Some(52000)), /// Allows using `&mut` in constant functions. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index d40823d2ed627..7e6633be31c2d 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -330,7 +330,6 @@ declare_features! ( (unstable, ermsb_target_feature, "1.49.0", Some(44839)), (unstable, hexagon_target_feature, "1.27.0", Some(44839)), (unstable, lahfsahf_target_feature, "1.78.0", Some(44839)), - (unstable, loongarch_target_feature, "1.73.0", Some(44839)), (unstable, m68k_target_feature, "CURRENT_RUSTC_VERSION", Some(134328)), (unstable, mips_target_feature, "1.27.0", Some(44839)), (unstable, powerpc_target_feature, "1.27.0", Some(44839)), diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs index 5372437b0d2ab..7fd05c64c4d9e 100644 --- a/compiler/rustc_target/src/target_features.rs +++ b/compiler/rustc_target/src/target_features.rs @@ -763,15 +763,15 @@ const CSKY_FEATURES: &[(&str, StabilityUncomputed, ImpliedFeatures)] = &[ const LOONGARCH_FEATURES: &[(&str, StabilityUncomputed, ImpliedFeatures)] = &[ // tidy-alphabetical-start - ("d", unstable(sym::loongarch_target_feature), &["f"]), - ("f", unstable(sym::loongarch_target_feature), &[]), - ("frecipe", unstable(sym::loongarch_target_feature), &[]), - ("lasx", unstable(sym::loongarch_target_feature), &["lsx"]), - ("lbt", unstable(sym::loongarch_target_feature), &[]), - ("lsx", unstable(sym::loongarch_target_feature), &["d"]), - ("lvz", unstable(sym::loongarch_target_feature), &[]), - ("relax", unstable(sym::loongarch_target_feature), &[]), - ("ual", unstable(sym::loongarch_target_feature), &[]), + ("d", STABLE, &["f"]), + ("f", STABLE, &[]), + ("frecipe", STABLE, &[]), + ("lasx", STABLE, &["lsx"]), + ("lbt", STABLE, &[]), + ("lsx", STABLE, &["d"]), + ("lvz", STABLE, &[]), + ("relax", STABLE, &[]), + ("ual", STABLE, &[]), // tidy-alphabetical-end ]; diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index e31957a1fa703..56206b1e7c929 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -202,7 +202,6 @@ #![feature(arm_target_feature)] #![feature(avx512_target_feature)] #![feature(hexagon_target_feature)] -#![feature(loongarch_target_feature)] #![feature(mips_target_feature)] #![feature(powerpc_target_feature)] #![feature(riscv_target_feature)] diff --git a/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs b/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs index 14af22c319313..4f4de5279c105 100644 --- a/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs +++ b/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs @@ -7913,20 +7913,6 @@ The tracking issue for this feature is: [#29598] [#29598]: https://github.com/rust-lang/rust/issues/29598 ------------------------- -"##, - default_severity: Severity::Allow, - warn_since: None, - deny_since: None, - }, - Lint { - label: "loongarch_target_feature", - description: r##"# `loongarch_target_feature` - -The tracking issue for this feature is: [#44839] - -[#44839]: https://github.com/rust-lang/rust/issues/44839 - ------------------------ "##, default_severity: Severity::Allow, diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs index 14fdad02f5665..a3e15da6ad68f 100644 --- a/tests/ui/target-feature/gate.rs +++ b/tests/ui/target-feature/gate.rs @@ -19,7 +19,6 @@ // gate-test-aarch64_ver_target_feature // gate-test-aarch64_unstable_target_feature // gate-test-csky_target_feature -// gate-test-loongarch_target_feature // gate-test-lahfsahf_target_feature // gate-test-prfchw_target_feature // gate-test-s390x_target_feature