Fix error index E0370 doctests on 32 bit platforms

This commit is contained in:
Oliver Middleton 2019-02-24 01:24:31 +00:00 committed by GitHub
parent c654968100
commit e7296fd1c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,