Debian Codegraph @

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

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 trait Foo {
5 fn bar() -> i32;
6 }
7
8 struct Test<T>(T);
9
10 impl<T> Foo for Test<T> {
11 fn bar() -> i32 {
12 123
13 }
14 }
15
16 fn main() {
17 let a: i32;
18 a = Test::<i32>::bar();
19 }