Skip to content

Conversation

@ehuss
Copy link
Contributor

@ehuss ehuss commented Dec 20, 2025

This clarifies that the literals expressed in the
RESERVED_RAW_IDENTIFIER rule cannot be followed by a XID_Continue character. Originally in my mind these literals were to be interpreted as tokens (and thus assume some kind of break follows them). However, since this is part of the lexer itself, this doesn't really work for it to be defined this way.

This helps ensure that strings like r#_f or r#selfie are not interpreted as reserved raw identifiers.

This clarifies that the literals expressed in the
RESERVED_RAW_IDENTIFIER rule cannot be followed by a XID_Continue
character. Originally in my mind these literals were to be interpreted
as tokens (and thus assume some kind of break follows them). However,
since this is part of the lexer itself, this doesn't really work for it
to be defined this way.

This helps ensure that strings like `r#_f` or `r#selfie` are not
interpreted as reserved raw identifiers.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Dec 20, 2025
@traviscross traviscross added this pull request to the merge queue Dec 22, 2025
Merged via the queue into rust-lang:master with commit 6a29736 Dec 22, 2025
5 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Dec 22, 2025
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