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

9 lines
268 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`
}