rust/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs
2023-08-30 17:24:11 +08:00

20 lines
249 B
Rust

// check-pass
fn and_chain() {
let z;
if true && { z = 3; true} && z == 3 {}
}
fn and_chain_2() {
let z;
true && { z = 3; true} && z == 3;
}
fn or_chain() {
let z;
if false || { z = 3; false} || z == 3 {}
}
fn main() {
}