about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Platt <platt.nicholas@gmail.com>2015-05-09 23:18:28 -0400
committerNick Platt <platt.nicholas@gmail.com>2015-05-10 11:04:24 -0400
commit5613502a4f3476e5db2c68bdf203104556796630 (patch)
tree8cd2399f0b918e6c2e9b617a40de4e8fedf737f3
parent750f2c63f2737305d33288303cdecb7a470a7922 (diff)
downloadrust-5613502a4f3476e5db2c68bdf203104556796630.tar.gz
rust-5613502a4f3476e5db2c68bdf203104556796630.zip
Add long diagnostic for E0067
-rw-r--r--src/librustc_typeck/diagnostics.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index 0e6386618f1..2cc1b23e03e 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -46,6 +46,23 @@ enum variant, one of the fields was not provided. Each field should be specified
 exactly once.
 "##,
 
+E0067: r##"
+The left-hand side of an assignment operator must be an lvalue expression. An
+lvalue expression represents a memory location and includes item paths (ie,
+namespaced variables), dereferences, indexing expressions, and field references.
+
+```
+use std::collections::LinkedList;
+
+// Good
+let mut list = LinkedList::new();
+
+
+// Bad: assignment to non-lvalue expression
+LinkedList::new() += 1;
+```
+"##,
+
 E0081: r##"
 Enum discriminants are used to differentiate enum variants stored in memory.
 This error indicates that the same value was used for two or more variants,
@@ -149,7 +166,6 @@ register_diagnostics! {
     E0060,
     E0061,
     E0066,
-    E0067,
     E0068,
     E0069,
     E0070,