Skip to content

Commit a28d509

Browse files
committed
Improve keyword comments a little.
1 parent 9dd5340 commit a28d509

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: compiler/rustc_span/src/symbol.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ symbols! {
2626
// documents (such as the Rust Reference) about whether it is a keyword
2727
// (e.g. `_`).
2828
//
29-
// If you modify this list, adjust any relevant `Symbol::{is,can_be}_*` predicates and
30-
// `used_keywords`.
31-
// But this should rarely be necessary if the keywords are kept in alphabetic order.
29+
// If you modify this list, adjust any relevant `Symbol::{is,can_be}_*`
30+
// predicates and `used_keywords`. (This should rarely be necessary if
31+
// the keywords are kept in alphabetic order.) Also consider adding new
32+
// keywords to the `ui/parser/raw/raw-idents.rs` test.
3233
Keywords {
3334
// Special reserved identifiers used internally for elided lifetimes,
3435
// unnamed method parameters, crate root module, error recovery etc.
@@ -113,8 +114,6 @@ symbols! {
113114
Gen: "gen", // >= 2024 Edition only
114115
Try: "try", // >= 2018 Edition only
115116

116-
// NOTE: When adding new keywords, consider adding them to the ui/parser/raw/raw-idents.rs test.
117-
118117
// "Lifetime keywords": regular keywords with a leading `'`.
119118
// Matching predicates: none
120119
UnderscoreLifetime: "'_",

0 commit comments

Comments
 (0)