mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-02 21:32:03 +00:00
29 lines
506 B
Rust
29 lines
506 B
Rust
#![deny(unused_variables)]
|
|
|
|
fn main() {
|
|
let Some(_): Option<u32> = ({
|
|
let x = 1; //~ ERROR unused variable: `x`
|
|
Some(1)
|
|
}) else {
|
|
return;
|
|
};
|
|
|
|
#[allow(unused_variables)]
|
|
let Some(_): Option<u32> = ({
|
|
let x = 1;
|
|
Some(1)
|
|
}) else {
|
|
return;
|
|
};
|
|
|
|
let Some(_): Option<u32> = ({
|
|
#[allow(unused_variables)]
|
|
let x = 1;
|
|
Some(1)
|
|
}) else {
|
|
return;
|
|
};
|
|
|
|
let x = 1; //~ ERROR unused variable: `x`
|
|
}
|