add needs-asm-support to invalid-sym-operand

This commit is contained in:
Folkert 2024-08-02 20:45:14 +02:00 committed by Amanieu d'Antras
parent 47e6db542e
commit eb726a50e6
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
//@ needs-asm-support
//@ ignore-nvptx64
//@ ignore-spirv
use std::arch::{asm, global_asm};
// Sym operands must point to a function or static

View File

@ -1,5 +1,5 @@
error: invalid `sym` operand
--> $DIR/invalid-sym-operand.rs:23:24
--> $DIR/invalid-sym-operand.rs:27:24
|
LL | asm!("{}", sym x);
| ^ is a local variable
@ -7,7 +7,7 @@ LL | asm!("{}", sym x);
= help: `sym` operands must refer to either a function or a static
error: invalid `sym` operand
--> $DIR/invalid-sym-operand.rs:9:19
--> $DIR/invalid-sym-operand.rs:13:19
|
LL | global_asm!("{}", sym C);
| ^^^^^ is an `i32`
@ -15,7 +15,7 @@ LL | global_asm!("{}", sym C);
= help: `sym` operands must refer to either a function or a static
error: invalid `sym` operand
--> $DIR/invalid-sym-operand.rs:21:20
--> $DIR/invalid-sym-operand.rs:25:20
|
LL | asm!("{}", sym C);
| ^^^^^ is an `i32`