diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-03-06 17:32:47 +0900 |
|---|---|---|
| committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-03-06 17:33:21 +0900 |
| commit | 6e4dcea0d92e83bbcd983b525abf2a87971a9fe8 (patch) | |
| tree | 260b3a6d9ec6a0a83852793296663421d3be9987 /src/test | |
| parent | 51748a8fc77283914d4135f31b5966a407208187 (diff) | |
Handle negative literals in cast overflow warning
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/lint/type-overflow.stderr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/ui/lint/type-overflow.stderr b/src/test/ui/lint/type-overflow.stderr index 521223e3256..8a31fd44746 100644 --- a/src/test/ui/lint/type-overflow.stderr +++ b/src/test/ui/lint/type-overflow.stderr @@ -60,7 +60,8 @@ warning: literal out of range for `i8` LL | let fail = -0b1111_1111i8; | ^^^^^^^^^^^^^ help: consider using the type `i16` instead: `0b1111_1111i16` | - = note: the literal `0b1111_1111i8` (decimal `255`) does not fit into the type `i8` and will become `-1i8` + = note: the literal `0b1111_1111i8` (decimal `255`) does not fit into the type `i8` + = note: and the value `-0b1111_1111i8` will become `1i8` warning: 7 warnings emitted |
