Skip to content

Commit

Permalink
Fix error index E0370 doctests on 32 bit platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ollie27 authored Feb 24, 2019
1 parent c654968 commit e7296fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2865,8 +2865,8 @@ E0370: r##"
The maximum value of an enum was reached, so it cannot be automatically
set in the next enum value. Erroneous code example:
```compile_fail
#[deny(overflowing_literals)]
```compile_fail,E0370
#[repr(i64)]
enum Foo {
X = 0x7fffffffffffffff,
Y, // error: enum discriminant overflowed on value after
Expand All @@ -2879,6 +2879,7 @@ To fix this, please set manually the next enum value or put the enum variant
with the maximum value at the end of the enum. Examples:
```
#[repr(i64)]
enum Foo {
X = 0x7fffffffffffffff,
Y = 0, // ok!
Expand All @@ -2888,6 +2889,7 @@ enum Foo {
Or:
```
#[repr(i64)]
enum Foo {
Y = 0, // ok!
X = 0x7fffffffffffffff,
Expand Down

0 comments on commit e7296fd

Please sign in to comment.