mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-26 03:57:04 +00:00
this is more in line with the x86 parse error tests. The cross-platform tests were more complete anyway
20 lines
670 B
Rust
20 lines
670 B
Rust
//@ only-aarch64
|
|
|
|
use std::arch::asm;
|
|
|
|
fn main() {
|
|
let mut foo = 0;
|
|
let mut bar = 0;
|
|
unsafe {
|
|
asm!("", a = in("x0") foo);
|
|
//~^ ERROR explicit register arguments cannot have names
|
|
asm!("{a}", in("x0") foo, a = const bar);
|
|
//~^ ERROR attempt to use a non-constant value in a constant
|
|
asm!("{a}", in("x0") foo, a = const bar);
|
|
//~^ ERROR attempt to use a non-constant value in a constant
|
|
asm!("{1}", in("x0") foo, const bar);
|
|
//~^ ERROR positional arguments cannot follow named arguments or explicit register arguments
|
|
//~^^ ERROR attempt to use a non-constant value in a constant
|
|
}
|
|
}
|