about summary refs log tree commit diff
path: root/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr
blob: 7146949ca2f8f5fb6cafdb51e6a92c1dfccd12d8 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
error: invalid variable declaration
  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:2:5
   |
LL |     auto n = 0;
   |     ^^^^
   |
help: write `let` instead of `auto` to introduce a new variable
   |
LL -     auto n = 0;
LL +     let n = 0;
   |

error: invalid variable declaration
  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:4:5
   |
LL |     auto m;
   |     ^^^^
   |
help: write `let` instead of `auto` to introduce a new variable
   |
LL -     auto m;
LL +     let m;
   |

error: invalid variable declaration
  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:8:5
   |
LL |     var n = 0;
   |     ^^^
   |
help: write `let` instead of `var` to introduce a new variable
   |
LL -     var n = 0;
LL +     let n = 0;
   |

error: invalid variable declaration
  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:10:5
   |
LL |     var m;
   |     ^^^
   |
help: write `let` instead of `var` to introduce a new variable
   |
LL -     var m;
LL +     let m;
   |

error: invalid variable declaration
  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:14:5
   |
LL |     mut n = 0;
   |     ^^^
   |
help: missing keyword
   |
LL |     let mut n = 0;
   |     +++

error: invalid variable declaration
  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:16:5
   |
LL |     mut var;
   |     ^^^
   |
help: missing keyword
   |
LL |     let mut var;
   |     +++

error[E0308]: mismatched types
  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:20:33
   |
LL |     let _recovery_witness: () = 0;
   |                            --   ^ expected `()`, found integer
   |                            |
   |                            expected due to this

error: aborting due to 7 previous errors

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