blob: c85af7f3bcc79bcbf86b350857ee54023074ea8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#![feature(if_let_guard)]
#![deny(irrefutable_let_patterns)]
fn main() {
if let _ = 5 {} //~ ERROR irrefutable `if let` pattern
while let _ = 5 { //~ ERROR irrefutable `while let` pattern
break;
}
match 5 {
_ if let _ = 2 => {} //~ ERROR irrefutable `if let` guard pattern
_ => {}
}
}
|