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

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

impl<T> Foo<T, f32> {
    fn test<X>(self, a: X) -> (T, X) {
        (self.0, a)
    }
}

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

    let b;
    b = a.test(false);
}