diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/rust/compile/torture/identifier-missing-impl-1.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/torture/identifier-missing-impl-1.rs b/gcc/testsuite/rust/compile/torture/identifier-missing-impl-1.rs new file mode 100644 index 0000000..2389fa5 --- /dev/null +++ b/gcc/testsuite/rust/compile/torture/identifier-missing-impl-1.rs @@ -0,0 +1,19 @@ +struct I(); + +impl I { + fn () { + // { dg-error {expecting 'identifier' but '\(' found} "" { target *-*-* } .-1 } + // { dg-error {failed to parse inherent impl item in inherent impl} "" { target *-*-* } .-2 } + // { dg-error {failed to parse item in crate} "" { target *-*-* } .-3 } + } +} + +impl I { + unsafe fn () { + // { dg-error {expecting 'identifier' but '\(' found} "" { xfail *-*-* } .-1 } + } +} + +fn main() { + let _i = I(); +} |