summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/recover-from-semicolon-trailing-item.stderr
blob: 9588eedc98b4ae35b9f2020b5c0ff2b2b50d09ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
error: expected item, found `;`
  --> $DIR/recover-from-semicolon-trailing-item.rs:2:9
   |
LL | mod M {};
   |         ^ help: remove this semicolon

error: expected item, found `;`
  --> $DIR/recover-from-semicolon-trailing-item.rs:4:12
   |
LL | struct S {};
   |            ^ help: remove this semicolon
   |
   = help: braced struct declarations are not followed by a semicolon

error: expected item, found `;`
  --> $DIR/recover-from-semicolon-trailing-item.rs:6:20
   |
LL | fn foo(a: usize) {};
   |                    ^ help: remove this semicolon

error[E0308]: mismatched types
  --> $DIR/recover-from-semicolon-trailing-item.rs:10:20
   |
LL |     let _: usize = S {};
   |            -----   ^^^^ expected `usize`, found struct `S`
   |            |
   |            expected due to this

error[E0308]: mismatched types
  --> $DIR/recover-from-semicolon-trailing-item.rs:12:20
   |
LL |     let _: usize = X {};
   |            -----   ^^^^ expected `usize`, found struct `X`
   |            |
   |            expected due to this

error[E0308]: mismatched types
  --> $DIR/recover-from-semicolon-trailing-item.rs:14:9
   |
LL |     foo("");
   |     --- ^^ expected `usize`, found `&str`
   |     |
   |     arguments to this function are incorrect
   |
note: function defined here
  --> $DIR/recover-from-semicolon-trailing-item.rs:6:4
   |
LL | fn foo(a: usize) {};
   |    ^^^ --------

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0308`.