summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/traits2.rs
blob: fc6eb6002e0e57df938641cde51f345e8225e0dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
trait Foo {
    fn bar() -> i32;
}

struct Test<T>(T);

impl<T> Foo for Test<T> {
    fn bar() -> i32 {
        123
    }
}

fn main() {
    let a: i32;
    a = Test::<i32>::bar();
}