rust/tests/ui/let-else/let-else-irrefutable.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
287 B
Rust
Raw Normal View History

2021-08-01 19:18:50 -05:00
// 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
};
2021-08-01 19:18:50 -05:00
}