Skip to content

Commit 2730256

Browse files
committed
Remove unused error code
1 parent 3dc7e93 commit 2730256

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,41 +1020,6 @@ Here `X` will have already been specified the discriminant 0 by the time `Y` is
10201020
encountered, so a conflict occurs.
10211021
"##,
10221022

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-
10581023
E0084: r##"
10591024
An unsupported representation was attempted on a zero-variant enum.
10601025

0 commit comments

Comments
 (0)