Skip to content

Commit 4b6f083

Browse files
committed
Add the movrs target feature and movrs_target_feature feature gate
1 parent 4bd55ae commit 4b6f083

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed

Diff for: compiler/rustc_feature/src/unstable.rs

+1
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ declare_features! (
323323
(unstable, loongarch_target_feature, "1.73.0", Some(44839)),
324324
(unstable, m68k_target_feature, "1.85.0", Some(134328)),
325325
(unstable, mips_target_feature, "1.27.0", Some(44839)),
326+
(unstable, movrs_target_feature, "CURRENT_RUSTC_VERSION", Some(137976)),
326327
(unstable, powerpc_target_feature, "1.27.0", Some(44839)),
327328
(unstable, prfchw_target_feature, "1.78.0", Some(44839)),
328329
(unstable, riscv_target_feature, "1.45.0", Some(44839)),

Diff for: compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,7 @@ symbols! {
13481348
movbe_target_feature,
13491349
move_ref_pattern,
13501350
move_size_limit,
1351+
movrs_target_feature,
13511352
mul,
13521353
mul_assign,
13531354
mul_with_overflow,

Diff for: compiler/rustc_target/src/target_features.rs

+1
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ static X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
423423
("lahfsahf", Unstable(sym::lahfsahf_target_feature), &[]),
424424
("lzcnt", Stable, &[]),
425425
("movbe", Stable, &[]),
426+
("movrs", Unstable(sym::movrs_target_feature), &[]),
426427
("pclmulqdq", Stable, &["sse2"]),
427428
("popcnt", Stable, &[]),
428429
("prfchw", Unstable(sym::prfchw_target_feature), &[]),

Diff for: tests/ui/check-cfg/target_feature.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
153153
`mclass`
154154
`mops`
155155
`movbe`
156+
`movrs`
156157
`mp`
157158
`mp1e2`
158159
`msa`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@ only-x86_64
2+
#[target_feature(enable = "movrs")]
3+
//~^ ERROR: currently unstable
4+
unsafe fn foo() {}
5+
6+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error[E0658]: the target feature `movrs` is currently unstable
2+
--> $DIR/feature-gate-movrs_target_feature.rs:2:18
3+
|
4+
LL | #[target_feature(enable = "movrs")]
5+
| ^^^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #137976 <https://github.com/rust-lang/rust/issues/137976> for more information
8+
= help: add `#![feature(movrs_target_feature)]` to the crate attributes to enable
9+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10+
11+
error: aborting due to 1 previous error
12+
13+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)