Debian Codegraph @

gcc/testsuite/rust/compile/torture/generics28.rs

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 struct Foo<A, B>(A, B);
5
6 impl Foo<i32, f32> {
7 fn test<X>(a: X) -> X {
8 a
9 }
10 }
11
12 fn main() {
13 let a;
14 a = Foo::test::<_>(123);
15
16 let b;
17 b = Foo::test::<bool>(true);
18
19 let c;
20 c = Foo::test(456f32);
21 }