about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-12-22 18:42:15 +0000
committervarkor <github@varkor.com>2019-12-23 11:16:51 +0000
commitb7bfdbe68147f2ea8ca4870270643180bef76e02 (patch)
treefb88c336f1511d88f844f31703e7b14391b04b02 /src/test/ui/error-codes
parenta5991c57cf4430d1f67886637c65f2178ff1b372 (diff)
downloadrust-b7bfdbe68147f2ea8ca4870270643180bef76e02.tar.gz
rust-b7bfdbe68147f2ea8ca4870270643180bef76e02.zip
Improve invalid assignment error
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0067.stderr8
-rw-r--r--src/test/ui/error-codes/E0070.stderr18
2 files changed, 17 insertions, 9 deletions
diff --git a/src/test/ui/error-codes/E0067.stderr b/src/test/ui/error-codes/E0067.stderr
index 0334565840f..526503798b3 100644
--- a/src/test/ui/error-codes/E0067.stderr
+++ b/src/test/ui/error-codes/E0067.stderr
@@ -8,11 +8,13 @@ LL |     LinkedList::new() += 1;
    |
    = note: an implementation of `std::ops::AddAssign` might be missing for `std::collections::LinkedList<_>`
 
-error[E0067]: invalid left-hand side expression
-  --> $DIR/E0067.rs:4:5
+error[E0067]: invalid left-hand side of assignment
+  --> $DIR/E0067.rs:4:23
    |
 LL |     LinkedList::new() += 1;
-   |     ^^^^^^^^^^^^^^^^^ invalid expression for left-hand side
+   |     ----------------- ^^
+   |     |
+   |     cannot assign to this expression
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr
index 845833bc82f..1fb812d9467 100644
--- a/src/test/ui/error-codes/E0070.stderr
+++ b/src/test/ui/error-codes/E0070.stderr
@@ -1,14 +1,18 @@
-error[E0070]: invalid left-hand side expression
+error[E0070]: invalid left-hand side of assignment
   --> $DIR/E0070.rs:6:5
    |
 LL |     SOME_CONST = 14;
-   |     ^^^^^^^^^^^^^^^ left-hand of expression not valid
+   |     ----------^^^^^
+   |     |
+   |     cannot assign to this expression
 
-error[E0070]: invalid left-hand side expression
+error[E0070]: invalid left-hand side of assignment
   --> $DIR/E0070.rs:7:5
    |
 LL |     1 = 3;
-   |     ^^^^^ left-hand of expression not valid
+   |     -^^^^
+   |     |
+   |     cannot assign to this expression
 
 error[E0308]: mismatched types
   --> $DIR/E0070.rs:8:25
@@ -16,11 +20,13 @@ error[E0308]: mismatched types
 LL |     some_other_func() = 4;
    |                         ^ expected `()`, found integer
 
-error[E0070]: invalid left-hand side expression
+error[E0070]: invalid left-hand side of assignment
   --> $DIR/E0070.rs:8:5
    |
 LL |     some_other_func() = 4;
-   |     ^^^^^^^^^^^^^^^^^^^^^ left-hand of expression not valid
+   |     -----------------^^^^
+   |     |
+   |     cannot assign to this expression
 
 error: aborting due to 4 previous errors