Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve keyword comments a little.
  • Loading branch information
nnethercote committed Mar 24, 2025
commit a28d5092e9da9973fd56a4de5e85a632400c85f0
9 changes: 4 additions & 5 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ symbols! {
// documents (such as the Rust Reference) about whether it is a keyword
// (e.g. `_`).
//
// If you modify this list, adjust any relevant `Symbol::{is,can_be}_*` predicates and
// `used_keywords`.
// But this should rarely be necessary if the keywords are kept in alphabetic order.
// If you modify this list, adjust any relevant `Symbol::{is,can_be}_*`
// predicates and `used_keywords`. (This should rarely be necessary if
// the keywords are kept in alphabetic order.) Also consider adding new
// keywords to the `ui/parser/raw/raw-idents.rs` test.
Keywords {
// Special reserved identifiers used internally for elided lifetimes,
// unnamed method parameters, crate root module, error recovery etc.
Expand Down Expand Up @@ -113,8 +114,6 @@ symbols! {
Gen: "gen", // >= 2024 Edition only
Try: "try", // >= 2018 Edition only

// NOTE: When adding new keywords, consider adding them to the ui/parser/raw/raw-idents.rs test.
Comment thread
nnethercote marked this conversation as resolved.

// "Lifetime keywords": regular keywords with a leading `'`.
// Matching predicates: none
UnderscoreLifetime: "'_",
Expand Down