aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-1773.rs
blob: 468497a4792ef56e5ad64292fccbf63a5b5de16e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#[lang = "sized"]
// { dg-skip-if "" { *-*-* } }
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);
}