2019-12-03 18:08:19 +01:00
|
|
|
error: invalid variable declaration
|
|
|
|
|
--> $DIR/issue-65257-invalid-var-decl-recovery.rs:2:5
|
|
|
|
|
|
|
|
|
|
|
LL | auto n = 0;
|
2019-12-04 12:15:01 +01:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
|
|
help: write `let` instead of `auto` to introduce a new variable
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - auto n = 0;
|
|
|
|
|
LL + let n = 0;
|
|
|
|
|
|
|
2019-12-03 18:08:19 +01:00
|
|
|
|
|
|
|
|
error: invalid variable declaration
|
|
|
|
|
--> $DIR/issue-65257-invalid-var-decl-recovery.rs:4:5
|
|
|
|
|
|
|
|
|
|
|
LL | auto m;
|
2019-12-04 12:15:01 +01:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
|
|
help: write `let` instead of `auto` to introduce a new variable
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - auto m;
|
|
|
|
|
LL + let m;
|
|
|
|
|
|
|
2019-12-03 18:08:19 +01:00
|
|
|
|
|
|
|
|
error: invalid variable declaration
|
|
|
|
|
--> $DIR/issue-65257-invalid-var-decl-recovery.rs:8:5
|
|
|
|
|
|
|
|
|
|
|
LL | var n = 0;
|
2019-12-04 12:15:01 +01:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
|
|
help: write `let` instead of `var` to introduce a new variable
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - var n = 0;
|
|
|
|
|
LL + let n = 0;
|
|
|
|
|
|
|
2019-12-03 18:08:19 +01:00
|
|
|
|
|
|
|
|
error: invalid variable declaration
|
|
|
|
|
--> $DIR/issue-65257-invalid-var-decl-recovery.rs:10:5
|
|
|
|
|
|
|
|
|
|
|
LL | var m;
|
2019-12-04 12:15:01 +01:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
|
|
help: write `let` instead of `var` to introduce a new variable
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - var m;
|
|
|
|
|
LL + let m;
|
|
|
|
|
|
|
2019-12-03 18:08:19 +01:00
|
|
|
|
|
|
|
|
error: invalid variable declaration
|
|
|
|
|
--> $DIR/issue-65257-invalid-var-decl-recovery.rs:14:5
|
|
|
|
|
|
|
|
|
|
|
LL | mut n = 0;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
|
|
help: missing keyword
|
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let mut n = 0;
|
2025-02-13 03:21:25 +00:00
|
|
|
| +++
|
2019-12-03 18:08:19 +01:00
|
|
|
|
|
|
|
|
error: invalid variable declaration
|
|
|
|
|
--> $DIR/issue-65257-invalid-var-decl-recovery.rs:16:5
|
|
|
|
|
|
|
|
|
|
|
LL | mut var;
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
|
|
help: missing keyword
|
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let mut var;
|
2025-02-13 03:21:25 +00:00
|
|
|
| +++
|
2019-12-03 18:08:19 +01:00
|
|
|
|
|
|
|
|
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`.
|