Skip to content

Commit 87d0d64

Browse files
committed
Restrict tests that use needs-asm-support to non-experimental
architectures
1 parent eb32c00 commit 87d0d64

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

src/test/ui/asm/issue-89305.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// as both unused and possibly-uninitialized.
33

44
// check-pass
5+
// needs-asm-support
56

67
#![feature(asm)]
78
#![warn(unused)]

src/test/ui/asm/issue-89305.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
warning: unused variable: `x`
2-
--> $DIR/issue-89305.rs:11:13
2+
--> $DIR/issue-89305.rs:12:13
33
|
44
LL | let x: () = asm!("nop");
55
| ^ help: if this is intentional, prefix it with an underscore: `_x`
66
|
77
note: the lint level is defined here
8-
--> $DIR/issue-89305.rs:7:9
8+
--> $DIR/issue-89305.rs:8:9
99
|
1010
LL | #![warn(unused)]
1111
| ^^^^^^

src/test/ui/consts/inline_asm.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// needs-asm-support
2+
13
#![feature(asm)]
24

35
const _: () = unsafe { asm!("nop") };

src/test/ui/consts/inline_asm.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0015]: inline assembly is not allowed in constants
2-
--> $DIR/inline_asm.rs:3:24
2+
--> $DIR/inline_asm.rs:5:24
33
|
44
LL | const _: () = unsafe { asm!("nop") };
55
| ^^^^^^^^^^^

src/tools/compiletest/src/util.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ const BIG_ENDIAN: &[&str] = &[
133133
];
134134

135135
static ASM_SUPPORTED_ARCHS: &[&str] = &[
136-
"x86", "x86_64", "arm", "aarch64", "riscv32", "riscv64", "nvptx64", "hexagon", "mips",
137-
"mips64", "spirv", "wasm32",
136+
"x86", "x86_64", "arm", "aarch64", "riscv32",
137+
"riscv64",
138+
// These targets require an additional asm_experimental_arch feature.
139+
// "nvptx64", "hexagon", "mips", "mips64", "spirv", "wasm32",
138140
];
139141

140142
pub fn has_asm_support(triple: &str) -> bool {

0 commit comments

Comments
 (0)