Restrict tests that use needs-asm-support to non-experimental
architectures
This commit is contained in:
parent
eb32c00216
commit
87d0d64b78
5 changed files with 10 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
|||
// as both unused and possibly-uninitialized.
|
||||
|
||||
// check-pass
|
||||
// needs-asm-support
|
||||
|
||||
#![feature(asm)]
|
||||
#![warn(unused)]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
warning: unused variable: `x`
|
||||
--> $DIR/issue-89305.rs:11:13
|
||||
--> $DIR/issue-89305.rs:12:13
|
||||
|
|
||||
LL | let x: () = asm!("nop");
|
||||
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-89305.rs:7:9
|
||||
--> $DIR/issue-89305.rs:8:9
|
||||
|
|
||||
LL | #![warn(unused)]
|
||||
| ^^^^^^
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// needs-asm-support
|
||||
|
||||
#![feature(asm)]
|
||||
|
||||
const _: () = unsafe { asm!("nop") };
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error[E0015]: inline assembly is not allowed in constants
|
||||
--> $DIR/inline_asm.rs:3:24
|
||||
--> $DIR/inline_asm.rs:5:24
|
||||
|
|
||||
LL | const _: () = unsafe { asm!("nop") };
|
||||
| ^^^^^^^^^^^
|
||||
|
|
|
@ -133,8 +133,10 @@ const BIG_ENDIAN: &[&str] = &[
|
|||
];
|
||||
|
||||
static ASM_SUPPORTED_ARCHS: &[&str] = &[
|
||||
"x86", "x86_64", "arm", "aarch64", "riscv32", "riscv64", "nvptx64", "hexagon", "mips",
|
||||
"mips64", "spirv", "wasm32",
|
||||
"x86", "x86_64", "arm", "aarch64", "riscv32",
|
||||
"riscv64",
|
||||
// These targets require an additional asm_experimental_arch feature.
|
||||
// "nvptx64", "hexagon", "mips", "mips64", "spirv", "wasm32",
|
||||
];
|
||||
|
||||
pub fn has_asm_support(triple: &str) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue