Skip to content

Commit 7874976

Browse files
committed
Stabilize the instruction_set feature
Signed-off-by: Yuki Okushi <[email protected]>
1 parent ce7f0f1 commit 7874976

File tree

10 files changed

+9
-52
lines changed

10 files changed

+9
-52
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ declare_features! (
185185
(accepted, infer_outlives_requirements, "1.30.0", Some(44493), None),
186186
/// Allows irrefutable patterns in `if let` and `while let` statements (RFC 2086).
187187
(accepted, irrefutable_let_patterns, "1.33.0", Some(44495), None),
188+
/// Allows `#[instruction_set(_)]` attribute.
189+
(accepted, isa_attribute, "CURRENT_RUSTC_VERSION", Some(74727), None),
188190
/// Allows some increased flexibility in the name resolution rules,
189191
/// especially around globs and shadowing (RFC 1560).
190192
(accepted, item_like_imports, "1.15.0", Some(35120), None),

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

-2
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,6 @@ declare_features! (
426426
(incomplete, inline_const_pat, "1.58.0", Some(76001), None),
427427
/// Allows using `pointer` and `reference` in intra-doc links
428428
(active, intra_doc_pointers, "1.51.0", Some(80896), None),
429-
/// Allows `#[instruction_set(_)]` attribute
430-
(active, isa_attribute, "1.48.0", Some(74727), None),
431429
// Allows setting the threshold for the `large_assignments` lint.
432430
(active, large_assignments, "1.52.0", Some(83518), None),
433431
/// Allows `if/while p && let q = r && ...` chains.

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

+1-5
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
384384
ungated!(no_builtins, CrateLevel, template!(Word), WarnFollowing),
385385
ungated!(target_feature, Normal, template!(List: r#"enable = "name""#), DuplicatesOk),
386386
ungated!(track_caller, Normal, template!(Word), WarnFollowing),
387+
ungated!(instruction_set, Normal, template!(List: "set"), ErrorPreceding),
387388
gated!(
388389
no_sanitize, Normal,
389390
template!(List: "address, memory, thread"), DuplicatesOk,
@@ -445,11 +446,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
445446
optimize, Normal, template!(List: "size|speed"), ErrorPreceding, optimize_attribute,
446447
experimental!(optimize),
447448
),
448-
// RFC 2867
449-
gated!(
450-
instruction_set, Normal, template!(List: "set"), ErrorPreceding,
451-
isa_attribute, experimental!(instruction_set)
452-
),
453449

454450
gated!(
455451
ffi_returns_twice, Normal, template!(Word), WarnFollowing, experimental!(ffi_returns_twice)

Diff for: src/test/ui/asm/issue-92378.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// needs-asm-support
44
// build-pass
55

6-
#![feature(no_core, lang_items, rustc_attrs, isa_attribute)]
6+
#![feature(no_core, lang_items, rustc_attrs)]
77
#![no_core]
88
#![crate_type = "rlib"]
99

Diff for: src/test/ui/error-codes/E0778.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#![feature(isa_attribute)]
2-
31
#[instruction_set()] //~ ERROR
4-
fn no_isa_defined() {
5-
}
2+
fn no_isa_defined() {}
63

7-
fn main() {
8-
}
4+
fn main() {}

Diff for: src/test/ui/error-codes/E0778.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0778]: `#[instruction_set]` requires an argument
2-
--> $DIR/E0778.rs:3:1
2+
--> $DIR/E0778.rs:1:1
33
|
44
LL | #[instruction_set()]
55
| ^^^^^^^^^^^^^^^^^^^^

Diff for: src/test/ui/error-codes/E0779.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
#![feature(isa_attribute)]
2-
31
#[instruction_set(arm::magic)] //~ ERROR
4-
fn main() {
5-
6-
}
2+
fn main() {}

Diff for: src/test/ui/error-codes/E0779.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0779]: invalid instruction set specified
2-
--> $DIR/E0779.rs:3:1
2+
--> $DIR/E0779.rs:1:1
33
|
44
LL | #[instruction_set(arm::magic)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Diff for: src/test/ui/feature-gates/feature-gate-isa_attribute.rs

-6
This file was deleted.

Diff for: src/test/ui/feature-gates/feature-gate-isa_attribute.stderr

-25
This file was deleted.

0 commit comments

Comments
 (0)