Skip to content

Commit

Permalink
Stabilize LoongArch target features
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed Jan 2, 2025
1 parent c528b8c commit 29c94f5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 26 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ declare_features! (
(accepted, let_else, "1.65.0", Some(87335)),
/// Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check.
(accepted, lint_reasons, "1.81.0", Some(54503)),
/// Allows `#[target_feature(...)]` on loongarch64 platforms
(accepted, loongarch_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
/// Allows `break {expr}` with a value inside `loop`s.
(accepted, loop_break_value, "1.19.0", Some(37339)),
/// Allows use of `?` as the Kleene "at most one" operator in macros.
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
18 changes: 9 additions & 9 deletions compiler/rustc_target/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
];

Expand Down
1 change: 0 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
14 changes: 0 additions & 14 deletions src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion tests/ui/target-feature/gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 29c94f5

Please sign in to comment.