File tree Expand file tree Collapse file tree 1 file changed +0
-35
lines changed Expand file tree Collapse file tree 1 file changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -1020,41 +1020,6 @@ Here `X` will have already been specified the discriminant 0 by the time `Y` is
1020
1020
encountered, so a conflict occurs.
1021
1021
"## ,
1022
1022
1023
- E0082 : r##"
1024
- #### Note: this error code is no longer emitted by the compiler.
1025
-
1026
- When you specify enum discriminants with `=`, the compiler expects `isize`
1027
- values by default. Or you can add the `repr` attibute to the enum declaration
1028
- for an explicit choice of the discriminant type. In either cases, the
1029
- discriminant values must fall within a valid range for the expected type;
1030
- otherwise this error is raised. For example:
1031
-
1032
- ```compile_fail
1033
- # #![deny(overflowing_literals)]
1034
- #[repr(u8)]
1035
- enum Thing {
1036
- A = 1024,
1037
- B = 5,
1038
- }
1039
- ```
1040
-
1041
- Here, 1024 lies outside the valid range for `u8`, so the discriminant for `A` is
1042
- invalid. Here is another, more subtle example which depends on target word size:
1043
-
1044
- ```compile_fail,E0080
1045
- # #[repr(i32)]
1046
- enum DependsOnPointerSize {
1047
- A = 1 << 32,
1048
- }
1049
- ```
1050
-
1051
- Here, `1 << 32` is interpreted as an `isize` value. So it is invalid for 32 bit
1052
- target (`target_pointer_width = "32"`) but valid for 64 bit target.
1053
-
1054
- You may want to change representation types to fix this, or else change invalid
1055
- discriminant values so that they fit within the existing type.
1056
- "## ,
1057
-
1058
1023
E0084 : r##"
1059
1024
An unsupported representation was attempted on a zero-variant enum.
1060
1025
You can’t perform that action at this time.
0 commit comments