mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
18 lines
395 B
Rust
18 lines
395 B
Rust
// run-rustfix
|
|
// only-x86_64
|
|
|
|
#![feature(asm, llvm_asm)]
|
|
#![allow(deprecated)] // llvm_asm!
|
|
|
|
fn main() {
|
|
unsafe {
|
|
let x = 1;
|
|
let y: i32;
|
|
asm!("" :: "r" (x));
|
|
//~^ ERROR the legacy LLVM-style asm! syntax is no longer supported
|
|
asm!("" : "=r" (y));
|
|
//~^ ERROR the legacy LLVM-style asm! syntax is no longer supported
|
|
let _ = y;
|
|
}
|
|
}
|