]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/bad-options.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / asm / bad-options.rs
1 // only-x86_64
2
3 #![feature(asm)]
4
5 fn main() {
6     let mut foo = 0;
7     unsafe {
8         asm!("", options(nomem, readonly));
9         //~^ ERROR the `nomem` and `readonly` options are mutually exclusive
10         asm!("", options(pure, nomem, noreturn));
11         //~^ ERROR the `pure` and `noreturn` options are mutually exclusive
12         //~^^ ERROR asm with `pure` option must have at least one output
13         asm!("{}", in(reg) foo, options(pure, nomem));
14         //~^ ERROR asm with `pure` option must have at least one output
15         asm!("{}", out(reg) foo, options(noreturn));
16         //~^ ERROR asm outputs are not allowed with the `noreturn` option
17     }
18 }