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.0 KiB
Rust
Raw Normal View History

// only-aarch64
// needs-asm-support
2020-06-16 14:32:13 -05:00
// run-rustfix
2021-12-10 18:11:10 -06:00
use std::arch::asm;
2020-06-16 14:32:13 -05: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 14:32:13 -05: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-10 18:11:10 -06:00
options( nostack), //~ ERROR the `nomem` option was already provided
options(), //~ ERROR the `noreturn` option was already provided
2020-06-16 14:32:13 -05:00
);
}
}