Skip to content

Numeric literals allow trailing underscores #860

New issue

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

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

Already on GitHub? # to your account

Closed
brson opened this issue Aug 23, 2011 · 2 comments
Closed

Numeric literals allow trailing underscores #860

brson opened this issue Aug 23, 2011 · 2 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Aug 23, 2011

let i = 0_______;

Works just fine. Likewise:

let i = 0_______i;
@brson
Copy link
Contributor Author

brson commented Aug 23, 2011

Now that I think of it, this may be intentional, since we allow underscore to separate digits. Kind of strange though.

@marijnh
Copy link
Contributor

marijnh commented Aug 24, 2011

Yes, this is intentional. You can insert underscores 'free-form' in numeric literals. I don't think we should enforce a style there.

@marijnh marijnh closed this as completed Aug 24, 2011
flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 24, 2022
`match_same_arms` fix

fixes rust-lang#860
fixes rust-lang#1140

changelog: Don't lint `match_same_arms` when an interposing arm's pattern would overlap
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* Fix sret julia GC issue

* Simplify

* Fixup

* Fix

* Fix version inv
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants