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

Underscores in numeric literals #155

Closed
varkor opened this issue Jul 23, 2020 · 3 comments
Closed

Underscores in numeric literals #155

varkor opened this issue Jul 23, 2020 · 3 comments

Comments

@varkor
Copy link
Member

varkor commented Jul 23, 2020

There appears to be no guideline for underscores at the moment. Perhaps it is intended to be left to the programmer, but in particular, I think specifying whether or not underscores are encouraged between a literal and its type, e.g. 5u32 vs 5_u32 could be helpful (or specifically excluded).

@calebcartwright
Copy link
Member

We received a similar feature request in rustfmt a couple months ago, but ultimately decided against trying to support it at that time

rust-lang/rustfmt#3949

@joshtriplett
Copy link
Member

joshtriplett commented Jul 23, 2020 via email

@calebcartwright
Copy link
Member

Closing as I agree with Josh's point about this not being applicable for inclusion within the style guide. Separately, if anyone feels strongly enough that they'd like to have the feature then I'd be receptive to reviewing a PR for rustfmt that gives the user the option.

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

No branches or pull requests

3 participants