rust/tests/ui/rfc-2497-if-let-chains/chains-without-let.rs
2023-01-11 09:32:08 +00:00

21 lines
297 B
Rust

fn and_chain() {
let z;
if true && { z = 3; true} && z == 3 {}
//~^ ERROR E0381
}
fn and_chain_2() {
let z;
true && { z = 3; true} && z == 3;
//~^ ERROR E0381
}
fn or_chain() {
let z;
if false || { z = 3; false} || z == 3 {}
//~^ ERROR E0381
}
fn main() {
}