aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/traits1.rs
blob: 8929501de6f5d5ddbb0488e05ae5f19bd797657e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#[lang = "sized"]
pub trait Sized {}

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();
}