rust/tests/ui/asm/issue-99122.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
244 B
Rust
Raw Normal View History

2022-07-10 18:55:38 +00:00
//@ needs-asm-support
//@ only-x86_64
pub unsafe fn test() {
let pointer = 1u32 as *const _;
//~^ ERROR cannot cast to a pointer of an unknown kind
core::arch::asm!(
"nop",
in("eax") pointer,
);
}
fn main() {}