gcc/testsuite/rust/compile/traits1.rs
raw| 1 | #[lang = "sized"] |
| 2 | pub trait Sized {} |
| 3 | |
| 4 | trait Foo { |
| 5 | fn Bar() -> i32 {} |
| 6 | // { dg-error "mismatched types, expected .i32. but got .()." "" { target *-*-* } .-1 } |
| 7 | } |
| 8 | |
| 9 | struct Baz; |
| 10 | |
| 11 | impl Foo for Baz { |
| 12 | fn Barrr() {} |
| 13 | // { dg-error "method .Barrr. is not a member of trait .Foo." "" { target *-*-* } .-1 } |
| 14 | } |
| 15 | |
| 16 | fn main() {} |