summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs
blob: 2c0571a7bdd3ea5f324b3352023188b630ce04d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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() {
}