mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
17 lines
304 B
Rust
17 lines
304 B
Rust
// Regression test for #89305, where a variable was erroneously reported
|
|
// as both unused and possibly-uninitialized.
|
|
|
|
// check-pass
|
|
// needs-asm-support
|
|
|
|
#![warn(unused)]
|
|
|
|
use std::arch::asm;
|
|
|
|
fn main() {
|
|
unsafe {
|
|
let x: () = asm!("nop");
|
|
//~^ WARNING: unused variable: `x`
|
|
}
|
|
}
|