Skip to content

Commit

Permalink
Restrict tests that use needs-asm-support to non-experimental
Browse files Browse the repository at this point in the history
architectures
  • Loading branch information
Amanieu committed Nov 7, 2021
1 parent eb32c00 commit 87d0d64
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/test/ui/asm/issue-89305.rs
Expand Up @@ -2,6 +2,7 @@
// as both unused and possibly-uninitialized.

// check-pass
// needs-asm-support

#![feature(asm)]
#![warn(unused)]
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/asm/issue-89305.stderr
@@ -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)]
| ^^^^^^
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/consts/inline_asm.rs
@@ -1,3 +1,5 @@
// needs-asm-support

#![feature(asm)]

const _: () = unsafe { asm!("nop") };
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/inline_asm.stderr
@@ -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") };
| ^^^^^^^^^^^
Expand Down
6 changes: 4 additions & 2 deletions src/tools/compiletest/src/util.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit 87d0d64

Please sign in to comment.