Expand partial error recovery for let with BinOpEq
This commit is contained in:
parent
d4fe9553f6
commit
48ff12acb1
2 changed files with 50 additions and 12 deletions
|
|
@ -8,13 +8,31 @@ error[E0067]: can't reassign to a uninitialized variable
|
|||
--> $DIR/let-binop.rs:4:11
|
||||
|
|
||||
LL | let b += 1;
|
||||
| ^^ help: replace with `=` to initialize the variable
|
||||
| ^^
|
||||
|
|
||||
help: replace with `=` to initialize the variable
|
||||
|
|
||||
LL | let b = 1;
|
||||
| ^
|
||||
help: remove to reassign to a previously initialized variable
|
||||
|
|
||||
LL | b += 1;
|
||||
| --
|
||||
|
||||
error[E0067]: can't reassign to a uninitialized variable
|
||||
--> $DIR/let-binop.rs:6:11
|
||||
|
|
||||
LL | let c *= 1;
|
||||
| ^^ help: replace with `=` to initialize the variable
|
||||
| ^^
|
||||
|
|
||||
help: replace with `=` to initialize the variable
|
||||
|
|
||||
LL | let c = 1;
|
||||
| ^
|
||||
help: remove to reassign to a previously initialized variable
|
||||
|
|
||||
LL | c *= 1;
|
||||
| --
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue