about summary refs log tree commit diff
path: root/tests/ui/expr/if/attrs/gate-whole-expr.rs
blob: 885909016b5e1b119e877d24fe11d0ac8b475335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ run-pass

fn main() {
    let x = 1;

    #[cfg(false)]
    if false {
        x = 2;
    } else if true {
        x = 3;
    } else {
        x = 4;
    }
    assert_eq!(x, 1);
}