rust/tests/ui/let-else/let-else-irrefutable.rs
2023-01-11 09:32:08 +00:00

12 lines
287 B
Rust

// check-pass
fn main() {
let x = 1 else { return }; //~ WARN irrefutable `let...else` pattern
// Multiline else blocks should not get printed
let x = 1 else { //~ WARN irrefutable `let...else` pattern
eprintln!("problem case encountered");
return
};
}