2022-12-21 16:29:35 +01:00
|
|
|
#![feature(if_let_guard)]
|
|
|
|
|
2019-07-28 03:32:10 +02:00
|
|
|
fn main() {
|
|
|
|
let a = Some("...".to_owned());
|
|
|
|
let b = match a {
|
|
|
|
Some(_) if { drop(a); false } => None,
|
|
|
|
x => x, //~ ERROR use of moved value: `a`
|
|
|
|
};
|
2022-12-21 16:29:35 +01:00
|
|
|
|
|
|
|
let a = Some("...".to_owned());
|
|
|
|
let b = match a {
|
|
|
|
Some(_) if let Some(()) = { drop(a); None } => None,
|
|
|
|
x => x, //~ ERROR use of moved value: `a`
|
|
|
|
};
|
2019-07-28 03:32:10 +02:00
|
|
|
}
|