summary refs log tree commit diff
path: root/src/test/ui/asm/rustfix-asm.rs
blob: 1e3bfd077081cf242671ee163c2320cd29d59a63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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;
    }
}