Auto merge of #76260 - xd009642:rfc/2867, r=jonas-schievink
Implementation of RFC2867 https://github.com/rust-lang/rust/issues/74727 So I've started work on this, I think my next steps are to make use of the `instruction_set` value in the llvm codegen but this is the point where I begin to get a bit lost. I'm looking at the code but it would be nice to have some guidance on what I've currently done and what I'm doing next 😄
This commit is contained in:
commit
03ef8a081e
22 changed files with 247 additions and 4 deletions
8
src/test/ui/error-codes/E0778.rs
Normal file
8
src/test/ui/error-codes/E0778.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(isa_attribute)]
|
||||
|
||||
#[instruction_set()] //~ ERROR
|
||||
fn no_isa_defined() {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
9
src/test/ui/error-codes/E0778.stderr
Normal file
9
src/test/ui/error-codes/E0778.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0778]: `#[instruction_set]` requires an argument
|
||||
--> $DIR/E0778.rs:3:1
|
||||
|
|
||||
LL | #[instruction_set()]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0778`.
|
||||
6
src/test/ui/error-codes/E0779.rs
Normal file
6
src/test/ui/error-codes/E0779.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#![feature(isa_attribute)]
|
||||
|
||||
#[instruction_set(arm::magic)] //~ ERROR
|
||||
fn main() {
|
||||
|
||||
}
|
||||
9
src/test/ui/error-codes/E0779.stderr
Normal file
9
src/test/ui/error-codes/E0779.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0779]: invalid instruction set specified
|
||||
--> $DIR/E0779.rs:3:1
|
||||
|
|
||||
LL | #[instruction_set(arm::magic)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0779`.
|
||||
6
src/test/ui/feature-gate-isa_attribute.rs
Normal file
6
src/test/ui/feature-gate-isa_attribute.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#[instruction_set]
|
||||
//~^ ERROR the `#[instruction_set]` attribute is an experimental feature [E0658]
|
||||
//~| ERROR malformed `instruction_set` attribute input
|
||||
//~| ERROR must specify an instruction set [E0778]
|
||||
fn main() {
|
||||
}
|
||||
25
src/test/ui/feature-gate-isa_attribute.stderr
Normal file
25
src/test/ui/feature-gate-isa_attribute.stderr
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
error: malformed `instruction_set` attribute input
|
||||
--> $DIR/feature-gate-isa_attribute.rs:1:1
|
||||
|
|
||||
LL | #[instruction_set]
|
||||
| ^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[instruction_set(set)]`
|
||||
|
||||
error[E0658]: the `#[instruction_set]` attribute is an experimental feature
|
||||
--> $DIR/feature-gate-isa_attribute.rs:1:1
|
||||
|
|
||||
LL | #[instruction_set]
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #74727 <https://github.com/rust-lang/rust/issues/74727> for more information
|
||||
= help: add `#![feature(isa_attribute)]` to the crate attributes to enable
|
||||
|
||||
error[E0778]: must specify an instruction set
|
||||
--> $DIR/feature-gate-isa_attribute.rs:1:1
|
||||
|
|
||||
LL | #[instruction_set]
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0658, E0778.
|
||||
For more information about an error, try `rustc --explain E0658`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue