mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
21 lines
370 B
Rust
21 lines
370 B
Rust
//@ needs-asm-support
|
|
#![deny(unsafe_code)]
|
|
|
|
use std::arch::global_asm;
|
|
|
|
#[allow(unsafe_code)]
|
|
mod allowed_unsafe {
|
|
std::arch::global_asm!("");
|
|
}
|
|
|
|
macro_rules! unsafe_in_macro {
|
|
() => {
|
|
global_asm!(""); //~ ERROR: usage of `core::arch::global_asm`
|
|
};
|
|
}
|
|
|
|
global_asm!(""); //~ ERROR: usage of `core::arch::global_asm`
|
|
unsafe_in_macro!();
|
|
|
|
fn main() {}
|