Skip to content

Commit 38f9cd4

Browse files
Clean up E0080 long explanation
1 parent 4eee955 commit 38f9cd4

File tree

1 file changed

+8
-4
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+8
-4
lines changed

src/librustc_error_codes/error_codes/E0080.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
This error indicates that the compiler was unable to sensibly evaluate a
2-
constant expression that had to be evaluated. Attempting to divide by 0
3-
or causing integer overflow are two ways to induce this error. For example:
1+
A constant value failed to get evaluated.
2+
3+
Erroneous code example:
44

55
```compile_fail,E0080
66
enum Enum {
77
X = (1 << 500),
8-
Y = (1 / 0)
8+
Y = (1 / 0),
99
}
1010
```
1111

12+
This error indicates that the compiler was unable to sensibly evaluate a
13+
constant expression that had to be evaluated. Attempting to divide by 0
14+
or causing an integer overflow are two ways to induce this error.
15+
1216
Ensure that the expressions given can be evaluated as the desired integer type.
1317
See the FFI section of the Reference for more information about using a custom
1418
integer type:

0 commit comments

Comments
 (0)