summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/traits16.rs
blob: afc4a86de6d5ed496b26417cc5add5964b959f20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
trait A {
    fn a() -> i32 {
        123
    }

    fn b() -> i32 {
        Self::a() + 456
    }
}

struct S;
impl A for S {}

fn main() {
    let a;
    a = S::a();

    let b;
    b = S::b();
}