Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decimal_literal_representation suggestion drops type suffixes #4763

Closed
ghost opened this issue Nov 1, 2019 · 4 comments · Fixed by #4956
Closed

decimal_literal_representation suggestion drops type suffixes #4763

ghost opened this issue Nov 1, 2019 · 4 comments · Fixed by #4956
Labels
C-bug Category: Clippy is not doing the correct thing I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied

Comments

@ghost
Copy link

ghost commented Nov 1, 2019

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.

@ghost
Copy link
Author

ghost commented Nov 1, 2019

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

@flip1995 flip1995 added C-bug Category: Clippy is not doing the correct thing I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied labels Nov 1, 2019
@flip1995
Copy link
Member

flip1995 commented Nov 1, 2019

We should fix the rustbot 🤔

@basil-cow
Copy link
Contributor

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

@ghost
Copy link
Author

ghost commented Nov 13, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants