diff options
| author | bors <bors@rust-lang.org> | 2023-06-11 02:43:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-11 02:43:45 +0000 |
| commit | f93df98b84232ab08f7e3bba0ef18826eaf9bf80 (patch) | |
| tree | 7e988300b45e2017903dc2dcfc238cce6949742f /compiler/rustc_mir_transform/src/coverage/debug.rs | |
| parent | ff3b49cfcb7f226d2d8dd4ab9e36fa3363e46b96 (diff) | |
| parent | bbb9204008297fc326fcf4dfbc07cee12f173081 (diff) | |
| download | rust-f93df98b84232ab08f7e3bba0ef18826eaf9bf80.tar.gz rust-f93df98b84232ab08f7e3bba0ef18826eaf9bf80.zip | |
Auto merge of #10914 - y21:issue10912, r=giraffate
handle exponent without digits in `numeric_literal` Fixes #10912 The numeric literal util module didn't check for exponents with no digits. So: https://github.com/rust-lang/rust-clippy/blob/384cf376120f09df7710d2ff39c986144a7b1517/clippy_utils/src/numeric_literal.rs#L163-L168 `exponent` here would be the empty string, which passed the `!= "0"` check (when it shouldn't have, it should probably be treated as if the user wrote `E0`), then later fails when counting the digits and subtracting one (0 - 1 = overflow). Also, interestingly I can't even write a test for this because exponents with no digits is some kind of error by itself and `cargo dev fmt` fails on it. changelog: [`unreadable_literal`]: don't (debug) ICE on numeric literal with empty exponent
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions
