Skip to content

Commit

Permalink
Auto merge of #102458 - JohnTitor:stabilize-instruction-set, r=oli-obk
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bors committed Nov 5, 2022
2 parents 371100b + 7874976 commit 1286ee2
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 52 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 @@ -191,6 +191,8 @@ declare_features! (
(accepted, infer_outlives_requirements, "1.30.0", Some(44493), None),
/// Allows irrefutable patterns in `if let` and `while let` statements (RFC 2086).
(accepted, irrefutable_let_patterns, "1.33.0", Some(44495), None),
/// Allows `#[instruction_set(_)]` attribute.
(accepted, isa_attribute, "CURRENT_RUSTC_VERSION", Some(74727), None),
/// Allows some increased flexibility in the name resolution rules,
/// especially around globs and shadowing (RFC 1560).
(accepted, item_like_imports, "1.15.0", Some(35120), None),
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,6 @@ declare_features! (
(incomplete, inline_const_pat, "1.58.0", Some(76001), None),
/// Allows using `pointer` and `reference` in intra-doc links
(active, intra_doc_pointers, "1.51.0", Some(80896), None),
/// Allows `#[instruction_set(_)]` attribute
(active, isa_attribute, "1.48.0", Some(74727), None),
// Allows setting the threshold for the `large_assignments` lint.
(active, large_assignments, "1.52.0", Some(83518), None),
/// Allows `if/while p && let q = r && ...` chains.
Expand Down
6 changes: 1 addition & 5 deletions compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
DuplicatesOk, @only_local: true,
),
ungated!(track_caller, Normal, template!(Word), WarnFollowing),
ungated!(instruction_set, Normal, template!(List: "set"), ErrorPreceding),
gated!(
no_sanitize, Normal,
template!(List: "address, memory, thread"), DuplicatesOk,
Expand Down Expand Up @@ -452,11 +453,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
optimize, Normal, template!(List: "size|speed"), ErrorPreceding, optimize_attribute,
experimental!(optimize),
),
// RFC 2867
gated!(
instruction_set, Normal, template!(List: "set"), ErrorPreceding,
isa_attribute, experimental!(instruction_set)
),

gated!(
ffi_returns_twice, Normal, template!(Word), WarnFollowing, experimental!(ffi_returns_twice)
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/asm/issue-92378.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// needs-asm-support
// build-pass

#![feature(no_core, lang_items, rustc_attrs, isa_attribute)]
#![feature(no_core, lang_items, rustc_attrs)]
#![no_core]
#![crate_type = "rlib"]

Expand Down
8 changes: 2 additions & 6 deletions src/test/ui/error-codes/E0778.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#![feature(isa_attribute)]

#[instruction_set()] //~ ERROR
fn no_isa_defined() {
}
fn no_isa_defined() {}

fn main() {
}
fn main() {}
2 changes: 1 addition & 1 deletion src/test/ui/error-codes/E0778.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0778]: `#[instruction_set]` requires an argument
--> $DIR/E0778.rs:3:1
--> $DIR/E0778.rs:1:1
|
LL | #[instruction_set()]
| ^^^^^^^^^^^^^^^^^^^^
Expand Down
6 changes: 1 addition & 5 deletions src/test/ui/error-codes/E0779.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
#![feature(isa_attribute)]

#[instruction_set(arm::magic)] //~ ERROR
fn main() {

}
fn main() {}
2 changes: 1 addition & 1 deletion src/test/ui/error-codes/E0779.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0779]: invalid instruction set specified
--> $DIR/E0779.rs:3:1
--> $DIR/E0779.rs:1:1
|
LL | #[instruction_set(arm::magic)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
6 changes: 0 additions & 6 deletions src/test/ui/feature-gates/feature-gate-isa_attribute.rs

This file was deleted.

25 changes: 0 additions & 25 deletions src/test/ui/feature-gates/feature-gate-isa_attribute.stderr

This file was deleted.

0 comments on commit 1286ee2

Please sign in to comment.