mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
b3d401ecb1
- Add `unsafe` blocks inside `unsafe fn` using unsafe constructs - Add `unsafe` qualifier to `extern` blocks - Add `unsafe` qualifier to `no_mangle` attributes
27 lines
491 B
Rust
27 lines
491 B
Rust
//@ignore-target: i686 x86
|
|
//@needs-asm-support
|
|
//@check-pass
|
|
|
|
#[warn(clippy::inline_asm_x86_intel_syntax)]
|
|
#[warn(clippy::inline_asm_x86_att_syntax)]
|
|
mod dont_warn {
|
|
use std::arch::{asm, global_asm};
|
|
|
|
pub(super) unsafe fn use_asm() {
|
|
unsafe {
|
|
asm!("");
|
|
asm!("", options());
|
|
asm!("", options(nostack));
|
|
}
|
|
}
|
|
|
|
global_asm!("");
|
|
global_asm!("", options());
|
|
}
|
|
|
|
fn main() {
|
|
unsafe {
|
|
dont_warn::use_asm();
|
|
}
|
|
}
|