Skip to content

Commit 1286ee2

Browse files
committedNov 5, 2022
Auto merge of #102458 - JohnTitor:stabilize-instruction-set, r=oli-obk
Stabilize the `instruction_set` feature Closes #74727 FCP is complete on #74727 (comment) r? `@pnkfelix` and/or `@nikomatsakis` cc `@xd009642` Signed-off-by: Yuki Okushi <[email protected]>
2 parents 371100b + 7874976 commit 1286ee2

File tree

10 files changed

+9
-52
lines changed

10 files changed

+9
-52
lines changed
 

‎compiler/rustc_feature/src/accepted.rs

+2
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ declare_features! (
191191
(accepted, infer_outlives_requirements, "1.30.0", Some(44493), None),
192192
/// Allows irrefutable patterns in `if let` and `while let` statements (RFC 2086).
193193
(accepted, irrefutable_let_patterns, "1.33.0", Some(44495), None),
194+
/// Allows `#[instruction_set(_)]` attribute.
195+
(accepted, isa_attribute, "CURRENT_RUSTC_VERSION", Some(74727), None),
194196
/// Allows some increased flexibility in the name resolution rules,
195197
/// especially around globs and shadowing (RFC 1560).
196198
(accepted, item_like_imports, "1.15.0", Some(35120), None),

‎compiler/rustc_feature/src/active.rs

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

‎compiler/rustc_feature/src/builtin_attrs.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
391391
DuplicatesOk, @only_local: true,
392392
),
393393
ungated!(track_caller, Normal, template!(Word), WarnFollowing),
394+
ungated!(instruction_set, Normal, template!(List: "set"), ErrorPreceding),
394395
gated!(
395396
no_sanitize, Normal,
396397
template!(List: "address, memory, thread"), DuplicatesOk,
@@ -452,11 +453,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
452453
optimize, Normal, template!(List: "size|speed"), ErrorPreceding, optimize_attribute,
453454
experimental!(optimize),
454455
),
455-
// RFC 2867
456-
gated!(
457-
instruction_set, Normal, template!(List: "set"), ErrorPreceding,
458-
isa_attribute, experimental!(instruction_set)
459-
),
460456

461457
gated!(
462458
ffi_returns_twice, Normal, template!(Word), WarnFollowing, experimental!(ffi_returns_twice)

‎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

‎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() {}

‎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
| ^^^^^^^^^^^^^^^^^^^^

‎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() {}

‎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
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎src/test/ui/feature-gates/feature-gate-isa_attribute.rs

-6
This file was deleted.

‎src/test/ui/feature-gates/feature-gate-isa_attribute.stderr

-25
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.