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

Lint literal suffixes not separated by underscores (idea also from #703) #1145

Merged
merged 2 commits into from
Aug 7, 2016

Conversation

birkenfeld
Copy link
Contributor

This changes much the same code as the #703 fix, so the branch is built on that.

@birkenfeld
Copy link
Contributor Author

Note that this new lint is Allow, because it would otherwise cause LOTs of warnings.

Even for codebases that do deny(clippy_pedantic) it might be too much.

let LitKind::Int(..) = lit.node,
let Some(src) = snippet_opt(cx, lit.span),
let Some(firstch) = src.chars().next(),
char::to_digit(firstch, 10).is_some()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because of NaN and Infinity? If so, leave a comment :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, never mind, macros

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants