gcc/testsuite/rust/compile/torture/identifier-missing-impl-1.rs
raw| 1 | struct I(); |
| 2 | |
| 3 | impl I { |
| 4 | fn () { |
| 5 | // { dg-error {expecting 'identifier' but '\(' found} "" { target *-*-* } .-1 } |
| 6 | // { dg-error {failed to parse inherent impl item in inherent impl} "" { target *-*-* } .-2 } |
| 7 | // { dg-error {failed to parse item in crate} "" { target *-*-* } .-3 } |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | impl I { |
| 12 | unsafe fn () { |
| 13 | // { dg-error {expecting 'identifier' but '\(' found} "" { xfail *-*-* } .-1 } |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | fn main() { |
| 18 | let _i = I(); |
| 19 | } |