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