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>2019-11-29 22:00:28 +0000
committerbors <bors@rust-lang.org>2019-11-29 22:00:28 +0000
commit9081929d45f12d3f56d43b1d6db7519981580fc9 (patch)
tree23864775c3e4cab78e4612aad345352b92a28f55 /src/librustc_error_codes/error_codes
parent25d8a9494ca6d77361e47c1505ecf640b168819e (diff)
parent0b1b36ccb6c84a16b097f58bb6aa249f5ce73821 (diff)
downloadrust-9081929d45f12d3f56d43b1d6db7519981580fc9.tar.gz
rust-9081929d45f12d3f56d43b1d6db7519981580fc9.zip
Auto merge of #66879 - RalfJung:rollup-nprxpzi, r=RalfJung
Rollup of 11 pull requests

Successful merges:

 - #66379 (Rephrase docs in for ptr)
 - #66589 (Draw vertical lines correctly in compiler error messages)
 - #66613 (Allow customising ty::TraitRef's printing behavior)
 - #66766 (Panic machinery comments and tweaks)
 - #66791 (Handle GlobalCtxt directly from librustc_interface query system)
 - #66793 (Record temporary static references in generator witnesses)
 - #66808 (Cleanup error code)
 - #66826 (Clarifies how to tag users for assigning PRs)
 - #66837 (Clarify `{f32,f64}::EPSILON` docs)
 - #66844 (Miri: do not consider memory allocated by caller_location leaked)
 - #66872 (Minor documentation fix)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0080.md12
-rw-r--r--src/librustc_error_codes/error_codes/E0081.md18
-rw-r--r--src/librustc_error_codes/error_codes/E0091.md5
3 files changed, 21 insertions, 14 deletions
diff --git a/src/librustc_error_codes/error_codes/E0080.md b/src/librustc_error_codes/error_codes/E0080.md
index 262bf00d385..273238a943b 100644
--- a/src/librustc_error_codes/error_codes/E0080.md
+++ b/src/librustc_error_codes/error_codes/E0080.md
@@ -1,14 +1,18 @@
-This error indicates that the compiler was unable to sensibly evaluate a
-constant expression that had to be evaluated. Attempting to divide by 0
-or causing integer overflow are two ways to induce this error. For example:
+A constant value failed to get evaluated.
+
+Erroneous code example:
 
 ```compile_fail,E0080
 enum Enum {
     X = (1 << 500),
-    Y = (1 / 0)
+    Y = (1 / 0),
 }
 ```
 
+This error indicates that the compiler was unable to sensibly evaluate a
+constant expression that had to be evaluated. Attempting to divide by 0
+or causing an integer overflow are two ways to induce this error.
+
 Ensure that the expressions given can be evaluated as the desired integer type.
 See the FFI section of the Reference for more information about using a custom
 integer type:
diff --git a/src/librustc_error_codes/error_codes/E0081.md b/src/librustc_error_codes/error_codes/E0081.md
index ec88ca9765e..fd5eca68e21 100644
--- a/src/librustc_error_codes/error_codes/E0081.md
+++ b/src/librustc_error_codes/error_codes/E0081.md
@@ -1,21 +1,23 @@
-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,
-making them impossible to tell apart.
+A discrimant value is present more than once.
+
+Erroneous code example:
 
 ```compile_fail,E0081
-// Bad.
 enum Enum {
     P = 3,
-    X = 3,
+    X = 3, // error!
     Y = 5,
 }
 ```
 
+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,
+making it impossible to distinguish them.
+
 ```
-// Good.
 enum Enum {
     P,
-    X = 3,
+    X = 3, // ok!
     Y = 5,
 }
 ```
@@ -27,7 +29,7 @@ variants.
 ```compile_fail,E0081
 enum Bad {
     X,
-    Y = 0
+    Y = 0, // error!
 }
 ```
 
diff --git a/src/librustc_error_codes/error_codes/E0091.md b/src/librustc_error_codes/error_codes/E0091.md
index 2a092402429..03cb3280371 100644
--- a/src/librustc_error_codes/error_codes/E0091.md
+++ b/src/librustc_error_codes/error_codes/E0091.md
@@ -1,5 +1,6 @@
-You gave an unnecessary type or const parameter in a type alias. Erroneous
-code example:
+An unnecessary type or const parameter was given in a type alias.
+
+Erroneous code example:
 
 ```compile_fail,E0091
 type Foo<T> = u32; // error: type parameter `T` is unused