rust/tests/ui/let-else/let-else-bool-binop-init.rs

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

9 lines
269 B
Rust
Raw Normal View History

2021-08-01 19:18:50 -05:00
//@ run-rustfix
2021-08-01 19:18:50 -05:00
fn main() {
let true = true && false else { return }; //~ ERROR a `&&` expression cannot be directly assigned in `let...else`
let true = true || false else { return }; //~ ERROR a `||` expression cannot be directly assigned in `let...else`
}