diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-03-08 20:09:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-08 20:09:01 +0100 |
| commit | 0ee2f4c3e050234ac977fdc8e44a43eb8e3c95a2 (patch) | |
| tree | 66812d4d0ab61ed355a90e95e40560ed74f5772e /src | |
| parent | 09b17a1c2dfc3853931e223bf1871655af7800f1 (diff) | |
| parent | 6e4dcea0d92e83bbcd983b525abf2a87971a9fe8 (diff) | |
| download | rust-0ee2f4c3e050234ac977fdc8e44a43eb8e3c95a2.tar.gz rust-0ee2f4c3e050234ac977fdc8e44a43eb8e3c95a2.zip | |
Rollup merge of #82829 - JohnTitor:handle-neg-val, r=estebank
Handle negative literals in cast overflow warning Closes #48535 r? `@estebank`
Diffstat (limited to 'src')
| -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 |
