]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/asm_syntax.rs
Auto merge of #101969 - reez12g:issue-101306, r=reez12g
[rust.git] / src / tools / clippy / tests / ui / asm_syntax.rs
1 // only-x86_64
2 // ignore-aarch64
3
4 #[warn(clippy::inline_asm_x86_intel_syntax)]
5 mod warn_intel {
6     pub(super) unsafe fn use_asm() {
7         use std::arch::asm;
8         asm!("");
9         asm!("", options());
10         asm!("", options(nostack));
11         asm!("", options(att_syntax));
12         asm!("", options(nostack, att_syntax));
13     }
14 }
15
16 #[warn(clippy::inline_asm_x86_att_syntax)]
17 mod warn_att {
18     pub(super) unsafe fn use_asm() {
19         use std::arch::asm;
20         asm!("");
21         asm!("", options());
22         asm!("", options(nostack));
23         asm!("", options(att_syntax));
24         asm!("", options(nostack, att_syntax));
25     }
26 }
27
28 #[cfg(target_arch = "x86_64")]
29 fn main() {
30     unsafe {
31         warn_att::use_asm();
32         warn_intel::use_asm();
33     }
34 }