Rust-clippy: decimal_literal_representation suggestion drops type suffixes

Created on 1 Nov 2019  路  4Comments  路  Source: rust-lang/rust-clippy

The suggestion below doesn't include the usize suffix.

#[warn(clippy::decimal_literal_representation)]

fn main() {
    let _ = 32_773usize;
}
warning: integer literal has a better hexadecimal representation
 --> src/main.rs:4:13
  |
4 |     let _ = 32_773usize;
  |             ^^^^^^^^^^^ help: consider: `0x8005`
  |

I'm busy with the fix for this.

L-bug L-suggestion-causes-error

All 4 comments

@rustbot modify labels: +L-bug +L-suggestion-causes-error

We should fix the rustbot :thinking:

@mikerite would you mind me taking over this if you haven't started with it yet?

I have a big set of changes for the literal_representation module that will make fixing this easy. I just need to rebase them. I should have the pull request ready either today or tomorrow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthiaskrgr picture matthiaskrgr  路  3Comments

spease picture spease  路  3Comments

matthiaskrgr picture matthiaskrgr  路  3Comments

nbaksalyar picture nbaksalyar  路  3Comments

phansch picture phansch  路  3Comments