blob: a76f4c02ffc8b8753be0b905a20d201272fa29ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#[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 Bar() {}
// { dg-error "mismatched types, expected" "" { target *-*-* } .-1 }
// { dg-error "method .Bar. has an incompatible type for trait .Foo." "" { target *-*-* } .-2 }
}
fn main() {}
|