]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr
36548a3dfcbfa49c2467cb82010fb1b9cd27d606
[rust.git] / src / test / ui / suggestions / recover-from-semicolon-trailing-item.stderr
1 error: expected item, found `;`
2   --> $DIR/recover-from-semicolon-trailing-item.rs:2:9
3    |
4 LL | mod M {};
5    |         ^ help: remove this semicolon
6
7 error: expected item, found `;`
8   --> $DIR/recover-from-semicolon-trailing-item.rs:4:12
9    |
10 LL | struct S {};
11    |            ^ help: remove this semicolon
12    |
13    = help: braced struct declarations are not followed by a semicolon
14
15 error: expected item, found `;`
16   --> $DIR/recover-from-semicolon-trailing-item.rs:6:20
17    |
18 LL | fn foo(a: usize) {};
19    |                    ^ help: remove this semicolon
20
21 error[E0308]: mismatched types
22   --> $DIR/recover-from-semicolon-trailing-item.rs:10:20
23    |
24 LL |     let _: usize = S {};
25    |                    ^^^^ expected usize, found struct `S`
26    |
27    = note: expected type `usize`
28             found struct `S`
29
30 error[E0308]: mismatched types
31   --> $DIR/recover-from-semicolon-trailing-item.rs:12:20
32    |
33 LL |     let _: usize = X {};
34    |                    ^^^^ expected usize, found struct `main::X`
35    |
36    = note: expected type `usize`
37             found struct `main::X`
38
39 error[E0308]: mismatched types
40   --> $DIR/recover-from-semicolon-trailing-item.rs:14:9
41    |
42 LL |     foo("");
43    |         ^^ expected usize, found reference
44    |
45    = note:   expected type `usize`
46            found reference `&'static str`
47
48 error: aborting due to 6 previous errors
49
50 For more information about this error, try `rustc --explain E0308`.