summary refs log tree commit diff
path: root/src/test/ui/asm/issue-89305.rs
blob: bdcf3f305ebb18cc6841ff79ad59cd70000c747c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Regression test for #89305, where a variable was erroneously reported
// as both unused and possibly-uninitialized.

// check-pass

#![feature(asm)]
#![warn(unused)]

fn main() {
    unsafe {
        let x: () = asm!("nop");
        //~^ WARNING: unused variable: `x`
    }
}