]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/issue-89305.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / asm / issue-89305.rs
1 // Regression test for #89305, where a variable was erroneously reported
2 // as both unused and possibly-uninitialized.
3
4 // check-pass
5 // needs-asm-support
6
7 #![warn(unused)]
8
9 use std::arch::asm;
10
11 fn main() {
12     unsafe {
13         let x: () = asm!("nop");
14         //~^ WARNING: unused variable: `x`
15     }
16 }