summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/traits1.rs
blob: 90357738a81d26e29cd2bee102daf262b6e09caf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
trait Foo {
    fn bar() -> i32;
}

struct Test(i32, f32);

impl Foo for Test {
    fn bar() -> i32 {
        123
    }
}

fn main() {
    let a: i32;
    a = Test::bar();
}