aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/block_expr2.rs
blob: 7c3ff6980974b85e9948e0eb80fbe6021dd52223 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn test() -> i32 {
    123
}

fn main() {
    let a = { test() };
    let b = {
        // { dg-warning "unused name" "" { target *-*-* } .-1 }
        if a > 10 {
            a - 1
        } else {
            a + 1
        }
    };
}