summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs
blob: d851fac8e644fdac9dc70743538ff83ffc1322e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass

#![feature(let_chains)]
#![allow(irrefutable_let_patterns)]

fn main() {
    let first = Some(1);
    let second = Some(2);
    let mut n = 0;
    if let x = first && let y = second && 1 == 1 {
        assert_eq!(x, first);
        assert_eq!(y, second);
        n = 1;
    }
    assert_eq!(n, 1);
}