diff options
| author | Oliver Middleton <olliemail27@gmail.com> | 2019-02-24 01:24:31 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-24 01:24:31 +0000 |
| commit | e7296fd1c486e6837ebf0e318a1bd44aa6a31fcf (patch) | |
| tree | dc19f34cb9d1ebdb78224b4c8e9a5dbea6859a00 | |
| parent | c6549681008a09b9a267f1470fe959b428d69736 (diff) | |
| download | rust-e7296fd1c486e6837ebf0e318a1bd44aa6a31fcf.tar.gz rust-e7296fd1c486e6837ebf0e318a1bd44aa6a31fcf.zip | |
Fix error index E0370 doctests on 32 bit platforms
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 387dabe747a..8b067724122 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -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, |
