]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/x86_64/interpolated-idents.rs
Rollup merge of #97325 - tmiasko:capture-enum-field, r=arora-aman
[rust.git] / src / test / ui / asm / x86_64 / interpolated-idents.rs
1 // only-x86_64
2
3 use std::arch::asm;
4
5 macro_rules! m {
6     ($in:ident $out:ident $lateout:ident $inout:ident $inlateout:ident $const:ident $sym:ident
7      $pure:ident $nomem:ident $readonly:ident $preserves_flags:ident
8      $noreturn:ident $nostack:ident $att_syntax:ident $options:ident) => {
9         unsafe {
10             asm!("", $in(x) x, $out(x) x, $lateout(x) x, $inout(x) x, $inlateout(x) x,
11             //~^ ERROR asm outputs are not allowed with the `noreturn` option
12             const x, sym x,
13             $options($pure, $nomem, $readonly, $preserves_flags, $noreturn, $nostack, $att_syntax));
14             //~^ ERROR the `nomem` and `readonly` options are mutually exclusive
15             //~| ERROR the `pure` and `noreturn` options are mutually exclusive
16         }
17     };
18 }
19
20 fn main() {
21     m!(in out lateout inout inlateout const sym
22        pure nomem readonly preserves_flags
23        noreturn nostack att_syntax options);
24 }