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

trait Foo {
    fn Bar() -> i32 {}
    // { dg-error "mismatched types, expected .i32. but got .()." "" { target *-*-* } .-1 }
}

struct Baz;

impl Foo for Baz {
    fn Barrr() {}
    // { dg-error "method .Barrr. is not a member of trait .Foo." "" { target *-*-* } .-1 }
}

fn main() {}