about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-01-04 12:37:27 +0000
committerbors <bors@rust-lang.org>2020-01-04 12:37:27 +0000
commitcd8377d37e9bc47f9a5a982c41705a7800cbb51d (patch)
tree9702aa90c15372db60181490fbde313f8c6b87ba /src/librustc_error_codes/error_codes
parent79cf5e4fe23991ab281413623e3b50ba3deb24b2 (diff)
parenta86a18907b881e9e144e7420f7e9d568353c0f4f (diff)
downloadrust-cd8377d37e9bc47f9a5a982c41705a7800cbb51d.tar.gz
rust-cd8377d37e9bc47f9a5a982c41705a7800cbb51d.zip
Auto merge of #67866 - GuillaumeGomez:rollup-32vsg5b, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #67822 (Revert `const_err` lint checking of casts)
 - #67823 (improve some `Drop`-related error messages)
 - #67837 (Clean up err codes)
 - #67848 (Remove unused `#[link_name = "m"]` attributes)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0136.md7
-rw-r--r--src/librustc_error_codes/error_codes/E0161.md3
-rw-r--r--src/librustc_error_codes/error_codes/E0164.md38
3 files changed, 35 insertions, 13 deletions
diff --git a/src/librustc_error_codes/error_codes/E0136.md b/src/librustc_error_codes/error_codes/E0136.md
index c0e8c7e061c..b91b52c074c 100644
--- a/src/librustc_error_codes/error_codes/E0136.md
+++ b/src/librustc_error_codes/error_codes/E0136.md
@@ -1,5 +1,4 @@
-A binary can only have one entry point, and by default that entry point is the
-function `main()`. If there are multiple such functions, please rename one.
+More than one `main` function was found.
 
 Erroneous code example:
 
@@ -14,3 +13,7 @@ fn main() { // error!
     // ...
 }
 ```
+
+A binary can only have one entry point, and by default that entry point is the
+`main()` function. If there are multiple instances of this function, please
+rename one of them.
diff --git a/src/librustc_error_codes/error_codes/E0161.md b/src/librustc_error_codes/error_codes/E0161.md
index 26269db2327..c2e2f0240f4 100644
--- a/src/librustc_error_codes/error_codes/E0161.md
+++ b/src/librustc_error_codes/error_codes/E0161.md
@@ -1,5 +1,4 @@
-A value was moved. However, its size was not known at compile time, and only
-values of a known size can be moved.
+A value was moved whose size was not known at compile time.
 
 Erroneous code example:
 
diff --git a/src/librustc_error_codes/error_codes/E0164.md b/src/librustc_error_codes/error_codes/E0164.md
index b41ce6fad8e..48bb6f4b382 100644
--- a/src/librustc_error_codes/error_codes/E0164.md
+++ b/src/librustc_error_codes/error_codes/E0164.md
@@ -1,24 +1,44 @@
-This error means that an attempt was made to match a struct type enum
-variant as a non-struct type:
+Something which is neither a tuple struct nor a tuple variant was used as a
+pattern.
+
+Erroneous code example:
 
 ```compile_fail,E0164
-enum Foo { B { i: u32 } }
+enum A {
+    B,
+    C,
+}
+
+impl A {
+    fn new() {}
+}
 
-fn bar(foo: Foo) -> u32 {
+fn bar(foo: A) {
     match foo {
-        Foo::B(i) => i, // error E0164
+        A::new() => (), // error!
+        _ => {}
     }
 }
 ```
 
-Try using `{}` instead:
+This error means that an attempt was made to match something which is neither a
+tuple struct nor a tuple variant. Only these two elements are allowed as a
+pattern:
 
 ```
-enum Foo { B { i: u32 } }
+enum A {
+    B,
+    C,
+}
+
+impl A {
+    fn new() {}
+}
 
-fn bar(foo: Foo) -> u32 {
+fn bar(foo: A) {
     match foo {
-        Foo::B{i} => i,
+        A::B => (), // ok!
+        _ => {}
     }
 }
 ```