]> git.lizzy.rs Git - rust.git/commitdiff
Clean up E0080 long explanation
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Wed, 27 Nov 2019 12:51:38 +0000 (13:51 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Wed, 27 Nov 2019 17:02:05 +0000 (18:02 +0100)
src/librustc_error_codes/error_codes/E0080.md

index 262bf00d385406e18278a828bfd4fd7e22683402..273238a943b4fc9c9cce248c0a076abbce8ee768 100644 (file)
@@ -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: