2022-12-21 09:29:35 -06:00
|
|
|
#![feature(if_let_guard)]
|
|
|
|
|
2019-07-27 20:32:10 -05: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 09:29:35 -06: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-27 20:32:10 -05:00
|
|
|
}
|