Fix error index E0370 doctests on 32 bit platforms
This commit is contained in:
parent
c654968100
commit
e7296fd1c4
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
@ -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!
|
||||
|
|
@ -2888,6 +2889,7 @@ enum Foo {
|
|||
Or:
|
||||
|
||||
```
|
||||
#[repr(i64)]
|
||||
enum Foo {
|
||||
Y = 0, // ok!
|
||||
X = 0x7fffffffffffffff,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue