Skip to content

Commit

Permalink
add needs-asm-support to invalid-sym-operand
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertdev authored and Amanieu committed Aug 2, 2024
1 parent 47e6db5 commit eb726a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions tests/ui/asm/invalid-sym-operand.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/asm/invalid-sym-operand.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
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
|
= 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`
|
= 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`
Expand Down

0 comments on commit eb726a5

Please sign in to comment.