aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/generics29.rs
blob: e9c693e6db76029fd7e7720c6d38b7e7c5d3768c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#[lang = "sized"]
pub trait Sized {}

struct Foo<A, B>(A, B);

impl Foo<i32, f32> {
    fn test<X>(self, a: X) -> X {
        // { dg-warning "unused name" "" { target *-*-* } .-1 }
        a
    }
}

fn main() {
    let a;
    a = Foo(123, 456f32);

    let b;
    b = a.test::<bool>(false);
}