about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-03-13 05:56:30 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2021-03-13 06:06:54 +0900
commit0466b6ac6d2af6e9aa6cdcdde18acbf2a5056944 (patch)
tree431dd8f720ac7aa3da45333eca1d29b5f5b506e0 /src
parentb3e19a221e63dcffdef87e12eadf1f36a8b90295 (diff)
downloadrust-0466b6ac6d2af6e9aa6cdcdde18acbf2a5056944.tar.gz
rust-0466b6ac6d2af6e9aa6cdcdde18acbf2a5056944.zip
Improve the wording for the `can't reassign` error
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/parser/let-binop.stderr6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/parser/let-binop.stderr b/src/test/ui/parser/let-binop.stderr
index 90295854a2d..dd33e9157cf 100644
--- a/src/test/ui/parser/let-binop.stderr
+++ b/src/test/ui/parser/let-binop.stderr
@@ -3,18 +3,24 @@ error: can't reassign to an uninitialized variable
    |
 LL |     let a: i8 *= 1;
    |               ^^ help: initialize the variable
+   |
+   = help: if you meant to overwrite, remove the `let` binding
 
 error: can't reassign to an uninitialized variable
   --> $DIR/let-binop.rs:6:11
    |
 LL |     let b += 1;
    |           ^^ help: initialize the variable
+   |
+   = help: if you meant to overwrite, remove the `let` binding
 
 error: can't reassign to an uninitialized variable
   --> $DIR/let-binop.rs:8:11
    |
 LL |     let c *= 1;
    |           ^^ help: initialize the variable
+   |
+   = help: if you meant to overwrite, remove the `let` binding
 
 error: aborting due to 3 previous errors