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

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);
}