blob: 1a36bc5b372f7986a781d970ccc23eb1f0d19170 [file] [log] [blame]
// Check that temporaries in if-let guards are correctly scoped.
//@ build-pass
// -Zvalidate-mir
#![feature(if_let_guard)]
fn fun() {
match 0 {
_ => (),
_ if let Some(s) = std::convert::identity(&Some(String::new())) => {}
_ => (),
}
}
fn funner() {
match 0 {
_ => (),
_ | _ if let Some(s) = std::convert::identity(&Some(String::new())) => {}
_ => (),
}
}
fn main() {}