diff options
Diffstat (limited to 'gcc/testsuite/rust/compile/traits1.rs')
-rw-r--r-- | gcc/testsuite/rust/compile/traits1.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/traits1.rs b/gcc/testsuite/rust/compile/traits1.rs new file mode 100644 index 0000000..355064e --- /dev/null +++ b/gcc/testsuite/rust/compile/traits1.rs @@ -0,0 +1,13 @@ +trait Foo { + fn Bar() -> i32 {} + // { dg-error "expected .i32. 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() {} |