Debian Codegraph @

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

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 trait A {
5 fn a() -> i32 {
6 123
7 }
8 }
9
10 trait B: A {
11 fn b() -> i32 {
12 Self::a() + 456
13 }
14 }
15
16 struct S;
17 impl A for S {}
18 impl B for S {}
19
20 fn main() {
21 let a;
22 a = S::a();
23
24 let b;
25 b = S::b();
26 }