diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-11-27 13:51:38 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-11-27 18:02:05 +0100 |
| commit | 38f9cd4d696a729dcf832a62af0f2eb43908bafb (patch) | |
| tree | 96076e71835bb1ca214dca0d2d8f539406cb65fd | |
| parent | 4eee955502558a049df75b4313a60cf57c885aa6 (diff) | |
| download | rust-38f9cd4d696a729dcf832a62af0f2eb43908bafb.tar.gz rust-38f9cd4d696a729dcf832a62af0f2eb43908bafb.zip | |
Clean up E0080 long explanation
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0080.md | 12 |
1 files changed, 8 insertions, 4 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: |
