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

trait Foo {
    fn bar() -> i32;
}

struct Test<T>(T);

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

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