diff options
| author | bors <bors@rust-lang.org> | 2020-10-09 00:29:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-09 00:29:47 +0000 |
| commit | 03ef8a081ef713609a65e71ed41c6775aeb138aa (patch) | |
| tree | 93f00603d6f1b4e7258c20e696619ffd8e727fa0 /src | |
| parent | 8a84c4f9c82fbcae8e12201c141518c357d88410 (diff) | |
| parent | bdb3f7716b567178ebda5006ed62cbe476408ef3 (diff) | |
| download | rust-03ef8a081ef713609a65e71ed41c6775aeb138aa.tar.gz rust-03ef8a081ef713609a65e71ed41c6775aeb138aa.zip | |
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 :smile:
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/error-codes/E0778.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0778.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0779.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0779.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/feature-gate-isa_attribute.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/feature-gate-isa_attribute.stderr | 25 |
6 files changed, 63 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0778.rs b/src/test/ui/error-codes/E0778.rs new file mode 100644 index 00000000000..60e5c2598f1 --- /dev/null +++ b/src/test/ui/error-codes/E0778.rs @@ -0,0 +1,8 @@ +#![feature(isa_attribute)] + +#[instruction_set()] //~ ERROR +fn no_isa_defined() { +} + +fn main() { +} diff --git a/src/test/ui/error-codes/E0778.stderr b/src/test/ui/error-codes/E0778.stderr new file mode 100644 index 00000000000..6ecae792423 --- /dev/null +++ b/src/test/ui/error-codes/E0778.stderr @@ -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`. diff --git a/src/test/ui/error-codes/E0779.rs b/src/test/ui/error-codes/E0779.rs new file mode 100644 index 00000000000..1b4dbce2036 --- /dev/null +++ b/src/test/ui/error-codes/E0779.rs @@ -0,0 +1,6 @@ +#![feature(isa_attribute)] + +#[instruction_set(arm::magic)] //~ ERROR +fn main() { + +} diff --git a/src/test/ui/error-codes/E0779.stderr b/src/test/ui/error-codes/E0779.stderr new file mode 100644 index 00000000000..da787260d4f --- /dev/null +++ b/src/test/ui/error-codes/E0779.stderr @@ -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`. diff --git a/src/test/ui/feature-gate-isa_attribute.rs b/src/test/ui/feature-gate-isa_attribute.rs new file mode 100644 index 00000000000..cb02a0955e9 --- /dev/null +++ b/src/test/ui/feature-gate-isa_attribute.rs @@ -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() { +} diff --git a/src/test/ui/feature-gate-isa_attribute.stderr b/src/test/ui/feature-gate-isa_attribute.stderr new file mode 100644 index 00000000000..2a95a80ca61 --- /dev/null +++ b/src/test/ui/feature-gate-isa_attribute.stderr @@ -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`. |
