2021-10-13 02:08:43 -05:00
|
|
|
// issue #89807
|
|
|
|
|
2022-02-27 00:08:31 -06:00
|
|
|
|
2021-10-13 02:08:43 -05:00
|
|
|
|
|
|
|
#[deny(unused_variables)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let value = Some(String::new());
|
|
|
|
#[allow(unused)]
|
|
|
|
let banana = 1;
|
|
|
|
#[allow(unused)]
|
2022-02-20 21:38:39 -06:00
|
|
|
let Some(chaenomeles) = value.clone() else { return }; // OK
|
|
|
|
|
|
|
|
let Some(chaenomeles) = value else { return }; //~ ERROR unused variable: `chaenomeles`
|
2021-10-13 02:08:43 -05:00
|
|
|
}
|