Skip to content

Parse underscores in identifiers for format! #9140

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

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link
Member

Closes #9119

@@ -563,7 +563,7 @@ impl<'self> Parser<'self> {
let mut end;
loop {
match self.cur.clone().next() {
Some((_, c)) if char::is_alphanumeric(c) => {
Some((_, c)) if c == '_' || char::is_alphanumeric(c) => {
Copy link
Member

Choose a reason for hiding this comment

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

Should this use XID_Start/XID_Continue (for the first & continuation characters resp.) like libsyntax does for identifiers?

@alexcrichton
Copy link
Member Author

Updated to use XID tables

bors added a commit that referenced this pull request Sep 12, 2013
@bors bors closed this Sep 12, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 18, 2022
Ignore `into_iter` in `significant_drop_in_scrutinee`

fixes rust-lang#9135
changelog: Ignore the `IntoIterator::into_iter` call from for loops in `significant_drop_in_scrutinee`
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.

Underscore in format! named substitutions causes "unterminated format string" error
3 participants