aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/identifier-missing-impl-1.rs
blob: 8a9b03163efda48934dea3e8e5ebd5d1a77acf70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 }
    }
}

impl I {
    unsafe fn () {
        // { dg-error {expecting 'identifier' but '\(' found} "" { xfail *-*-* } .-1 }
    }
}

fn main() {
    let _i = I();
}