mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
16 lines
380 B
Rust
16 lines
380 B
Rust
#![feature(if_let_guard)]
|
|
|
|
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`
|
|
};
|
|
|
|
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`
|
|
};
|
|
}
|