2021-09-27 16:06:16 -05:00
|
|
|
// Regression test for #89305, where a variable was erroneously reported
|
|
|
|
// as both unused and possibly-uninitialized.
|
|
|
|
|
2024-02-16 14:02:50 -06:00
|
|
|
//@ check-pass
|
|
|
|
//@ 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`
|
|
|
|
}
|
|
|
|
}
|