rust/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs
2023-06-05 16:09:46 +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() {
}