aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-08-04 09:33:19 +0200
committerThomas Schwinge <thomas@codesourcery.com>2021-08-04 09:33:19 +0200
commit0209c8f6624a287a2e23bfbce70e8729947c43be (patch)
treecae2323fcfdff7829f83f3f611975123d2ba8ba1 /gcc
parentd04886a4ea8e91801455a2b9808c1c9bbec896e4 (diff)
downloadgcc-0209c8f6624a287a2e23bfbce70e8729947c43be.zip
gcc-0209c8f6624a287a2e23bfbce70e8729947c43be.tar.gz
gcc-0209c8f6624a287a2e23bfbce70e8729947c43be.tar.bz2
Add 'rust/compile/torture/identifier-missing-impl-1.rs' [#603]
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/rust/compile/torture/identifier-missing-impl-1.rs19
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();
+}