summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-28777.rs
blob: 1f426b7185e8f250c41a55f78c0124e1e6784495 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// run-pass
#![allow(unused_braces)]
fn main() {
    let v1 = { 1 + {2} * {3} };
    let v2 =   1 + {2} * {3}  ;

    assert_eq!(7, v1);
    assert_eq!(7, v2);

    let v3;
    v3 = { 1 + {2} * {3} };
    let v4;
    v4 = 1 + {2} * {3};
    assert_eq!(7, v3);
    assert_eq!(7, v4);

    let v5 = { 1 + {2} * 3 };
    assert_eq!(7, v5);

    let v9 = { 1 + if 1 > 2 {1} else {2} * {3} };
    assert_eq!(7, v9);
}