2021-09-27 16:06:16 -05:00
|
|
|
// Regression test for #89305, where a variable was erroneously reported
|
|
|
|
// as both unused and possibly-uninitialized.
|
|
|
|
|
|
|
|
//@ check-pass
|
2021-11-03 11:10:09 -05:00
|
|
|
//@ needs-asm-support
|
2021-09-27 16:06:16 -05:00
|
|
|
|
|
|
|
#![warn(unused)]
|
|
|
|
|
2021-12-09 18:15:33 -06:00
|
|
|
use std::arch::asm;
|
|
|
|
|
2021-09-27 16:06:16 -05:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let x: () = asm!("nop");
|
|
|
|
//~^ WARNING: unused variable: `x`
|
|
|
|
}
|
|
|
|
}
|