Debian Codegraph @

gcc/testsuite/rust/compile/issue-3242.rs

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 trait Foo<T> {
5 type A;
6
7 fn test(a: Self::A) -> Self::A {
8 a
9 }
10 }
11
12 struct Bar<T>(T);
13 impl<T> Foo<T> for Bar<i32> {
14 type A = T;
15 }
16
17 fn main() {
18 let a;
19 a = Bar(123);
20
21 let b;
22 b = Bar::test(a.0);
23 }