aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-1773.rs
blob: c627ac09cecbca2538525d1dac1fe7569558fd5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
trait Foo<T> {
    type A;

    fn test(a: Self::A) -> Self::A {
        a
    }
}

struct Bar<T>(T);
impl<T> Foo<T> for Bar<i32> {
    type A = T;
}

fn main() {
    let a;
    a = Bar(123);

    let b;
    b = Bar::test(a.0);
}