Skip to content

Commit cb6584c

Browse files
committed
Stabilize LoongArch target features
1 parent c528b8c commit cb6584c

File tree

6 files changed

+11
-26
lines changed

6 files changed

+11
-26
lines changed

compiler/rustc_feature/src/accepted.rs

+2
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ declare_features! (
143143
/// As long as control flow is not implemented in const eval, `&&` and `||` may not be used
144144
/// at the same time as let bindings.
145145
(accepted, const_let, "1.33.0", Some(48821)),
146+
/// Allows `#[target_feature(...)]` on loongarch64 platforms
147+
(accepted, loongarch_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
146148
/// Allows the use of `loop` and `while` in constants.
147149
(accepted, const_loop, "1.46.0", Some(52000)),
148150
/// Allows using `&mut` in constant functions.

compiler/rustc_feature/src/unstable.rs

-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ declare_features! (
330330
(unstable, ermsb_target_feature, "1.49.0", Some(44839)),
331331
(unstable, hexagon_target_feature, "1.27.0", Some(44839)),
332332
(unstable, lahfsahf_target_feature, "1.78.0", Some(44839)),
333-
(unstable, loongarch_target_feature, "1.73.0", Some(44839)),
334333
(unstable, m68k_target_feature, "CURRENT_RUSTC_VERSION", Some(134328)),
335334
(unstable, mips_target_feature, "1.27.0", Some(44839)),
336335
(unstable, powerpc_target_feature, "1.27.0", Some(44839)),

compiler/rustc_target/src/target_features.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -763,15 +763,15 @@ const CSKY_FEATURES: &[(&str, StabilityUncomputed, ImpliedFeatures)] = &[
763763

764764
const LOONGARCH_FEATURES: &[(&str, StabilityUncomputed, ImpliedFeatures)] = &[
765765
// tidy-alphabetical-start
766-
("d", unstable(sym::loongarch_target_feature), &["f"]),
767-
("f", unstable(sym::loongarch_target_feature), &[]),
768-
("frecipe", unstable(sym::loongarch_target_feature), &[]),
769-
("lasx", unstable(sym::loongarch_target_feature), &["lsx"]),
770-
("lbt", unstable(sym::loongarch_target_feature), &[]),
771-
("lsx", unstable(sym::loongarch_target_feature), &["d"]),
772-
("lvz", unstable(sym::loongarch_target_feature), &[]),
773-
("relax", unstable(sym::loongarch_target_feature), &[]),
774-
("ual", unstable(sym::loongarch_target_feature), &[]),
766+
("d", STABLE, &["f"]),
767+
("f", STABLE, &[]),
768+
("frecipe", STABLE, &[]),
769+
("lasx", STABLE, &["lsx"]),
770+
("lbt", STABLE, &[]),
771+
("lsx", STABLE, &["d"]),
772+
("lvz", STABLE, &[]),
773+
("relax", STABLE, &[]),
774+
("ual", STABLE, &[]),
775775
// tidy-alphabetical-end
776776
];
777777

library/core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@
202202
#![feature(arm_target_feature)]
203203
#![feature(avx512_target_feature)]
204204
#![feature(hexagon_target_feature)]
205-
#![feature(loongarch_target_feature)]
206205
#![feature(mips_target_feature)]
207206
#![feature(powerpc_target_feature)]
208207
#![feature(riscv_target_feature)]

src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs

-14
Original file line numberDiff line numberDiff line change
@@ -7913,20 +7913,6 @@ The tracking issue for this feature is: [#29598]
79137913

79147914
[#29598]: https://github.com/rust-lang/rust/issues/29598
79157915

7916-
------------------------
7917-
"##,
7918-
default_severity: Severity::Allow,
7919-
warn_since: None,
7920-
deny_since: None,
7921-
},
7922-
Lint {
7923-
label: "loongarch_target_feature",
7924-
description: r##"# `loongarch_target_feature`
7925-
7926-
The tracking issue for this feature is: [#44839]
7927-
7928-
[#44839]: https://github.com/rust-lang/rust/issues/44839
7929-
79307916
------------------------
79317917
"##,
79327918
default_severity: Severity::Allow,

tests/ui/target-feature/gate.rs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
// gate-test-aarch64_ver_target_feature
2020
// gate-test-aarch64_unstable_target_feature
2121
// gate-test-csky_target_feature
22-
// gate-test-loongarch_target_feature
2322
// gate-test-lahfsahf_target_feature
2423
// gate-test-prfchw_target_feature
2524
// gate-test-s390x_target_feature

0 commit comments

Comments
 (0)