Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize the instruction_set feature #102458

Merged
merged 1 commit into from
Nov 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,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 @@ -426,8 +426,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 @@ -384,6 +384,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
ungated!(no_builtins, CrateLevel, template!(Word), WarnFollowing),
ungated!(target_feature, Normal, template!(List: r#"enable = "name""#), DuplicatesOk),
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 @@ -445,11 +446,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.