mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
16 lines
317 B
Rust
16 lines
317 B
Rust
// issue #89807
|
|
|
|
|
|
|
|
#[deny(unused_variables)]
|
|
|
|
fn main() {
|
|
let value = Some(String::new());
|
|
#[allow(unused)]
|
|
let banana = 1;
|
|
#[allow(unused)]
|
|
let Some(chaenomeles) = value.clone() else { return }; // OK
|
|
|
|
let Some(chaenomeles) = value else { return }; //~ ERROR unused variable: `chaenomeles`
|
|
}
|