1 impl dyn A {
2     Y
3 } //~ ERROR expected one of `!` or `::`, found `}`
4 
5 struct S;
6 
7 trait X {
8     X() {} //~ ERROR expected one of `!` or `::`, found `(`
xxx()9     fn xxx() { ### }
10     L = M;
11     Z = { 2 + 3 };
12     ::Y ();
13 }
14 
15 trait A {
16     X() {} //~ ERROR expected one of `!` or `::`, found `(`
17 }
18 trait B {
xxx()19     fn xxx() { ### } //~ ERROR expected
20 }
21 trait C {
22     L = M; //~ ERROR expected one of `!` or `::`, found `=`
23 }
24 trait D {
25     Z = { 2 + 3 }; //~ ERROR expected one of `!` or `::`, found `=`
26 }
27 trait E {
28     ::Y (); //~ ERROR expected one of
29 }
30 
31 impl S {
32     pub hello_method(&self) { //~ ERROR missing
33         println!("Hello");
34     }
35 }
36 
main()37 fn main() {
38     S.hello_method(); //~ no method named `hello_method` found
39 }
40