1 // test for https://github.com/rust-lang/rust/issues/29723
3 #![feature(if_let_guard)]
8 0 if { drop(s); false } => String::from("oops"),
10 // This should trigger an error,
11 // s could have been moved from.
13 //~^ ERROR use of moved value: `s`
17 let s = String::new();
19 0 if let Some(()) = { drop(s); None } => String::from("oops"),
20 _ => s //~ ERROR use of moved value: `s`