Skip to content

ident.raw.allowed: reference RESERVED_RAW_IDENTIFIER instead of RAW_IDENTIFIER - #2431

Open
firmiana402 wants to merge 1 commit into
rust-lang:masterfrom
firmiana402:fix-ident-raw-allowed-ref
Open

firmiana402 wants to merge 1 commit into
rust-lang:masterfrom
firmiana402:fix-ident-raw-allowed-ref

Conversation

@firmiana402

@firmiana402 firmiana402 commented Nov 30, 2026 •

Copy link
Copy Markdown

ident.raw.allowed currently states that a raw identifier may be any strict or reserved keyword except the ones listed above for RAW_IDENTIFIER. However, in ident.syntax, RAW_IDENTIFIER (r# IDENTIFIER_OR_KEYWORD) does not list any excluded keywords; the excluded keywords (_, crate, self, Self, super) are actually defined in RESERVED_RAW_IDENTIFIER.

Previously, #2049 moved those excluded keywords from RAW_IDENTIFIER to RESERVED_RAW_IDENTIFIER and updated ident.raw.reserved in src/identifiers.md, but ident.raw.allowed was missed.

This PR updates ident.raw.allowed to link to [RESERVED_RAW_IDENTIFIER] instead of referencing RAW_IDENTIFIER, matching ident.raw.reserved right below it.

The excluded keywords (_, crate, self, Self, super) were moved from RAW_IDENTIFIER to RESERVED_RAW_IDENTIFIER in rust-lang#2049, so ident.raw.allowed should reference RESERVED_RAW_IDENTIFIER.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Nov 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: The marked PR is awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants