]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/asm_syntax.rs
Rollup merge of #78769 - est31:remove_lifetimes, r=KodrAus
[rust.git] / src / tools / clippy / tests / ui / asm_syntax.rs
1 #![feature(asm)]
2 // only-x86_64
3
4 #[warn(clippy::inline_asm_x86_intel_syntax)]
5 mod warn_intel {
6     pub(super) unsafe fn use_asm() {
7         asm!("");
8         asm!("", options());
9         asm!("", options(nostack));
10         asm!("", options(att_syntax));
11         asm!("", options(nostack, att_syntax));
12     }
13 }
14
15 #[warn(clippy::inline_asm_x86_att_syntax)]
16 mod warn_att {
17     pub(super) unsafe fn use_asm() {
18         asm!("");
19         asm!("", options());
20         asm!("", options(nostack));
21         asm!("", options(att_syntax));
22         asm!("", options(nostack, att_syntax));
23     }
24 }
25
26 fn main() {
27     unsafe {
28         warn_att::use_asm();
29         warn_intel::use_asm();
30     }
31 }