summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/generics27.rs
blob: 9871638dd9fe678e98d167face69c3dd12e87401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// github issue #415
fn test<A>(a: &A) -> &A {
    a
}

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

    let a = 123f32;
    let b = &a;
    let c = test(b);
    // { dg-warning "unused name" "" { target *-*-* } .-1 }
}