summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/if_elif_else_expr1.rs
blob: 65ed7f7a23aaa9f824d003da369adbcae9f0f6a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn test(x: i32) -> i32 {
    if x == 10 {
        123
    } else if x < 10 {
        456
    } else {
        789
    }
}

fn main() {
    let a = test(1);
    // { dg-warning "unused name" "" { target *-*-* } .-1 }
}