rust/tests/ui/asm/aarch64/duplicate-options.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1 KiB
Rust
Raw Normal View History

// only-aarch64
// needs-asm-support
2020-06-16 19:32:13 +00:00
// run-rustfix
2021-12-11 00:11:10 +00:00
use std::arch::asm;
2020-06-16 19:32:13 +00:00
fn main() {
unsafe {
asm!("", options(nomem, ));
//~^ ERROR the `nomem` option was already provided
asm!("", options(preserves_flags, ));
//~^ ERROR the `preserves_flags` option was already provided
asm!("", options(nostack, preserves_flags), options());
2020-06-16 19:32:13 +00:00
//~^ ERROR the `nostack` option was already provided
asm!("", options(nostack, ), options(), options());
//~^ ERROR the `nostack` option was already provided
//~| ERROR the `nostack` option was already provided
//~| ERROR the `nostack` option was already provided
asm!(
"",
options(nomem, noreturn),
options(preserves_flags, ), //~ ERROR the `noreturn` option was already provided
2021-12-11 00:11:10 +00:00
options( nostack), //~ ERROR the `nomem` option was already provided
options(), //~ ERROR the `noreturn` option was already provided
2020-06-16 19:32:13 +00:00
);
}
}