about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-03-12 16:18:20 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-03-24 18:43:37 +1100
commita28d5092e9da9973fd56a4de5e85a632400c85f0 (patch)
treefbacfc922d12f51de20f0e9a87d81f22a827926f
parent9dd5340d3cbbd3acbe6cc9dfcbcea07e7eb4355e (diff)
downloadrust-a28d5092e9da9973fd56a4de5e85a632400c85f0.tar.gz
rust-a28d5092e9da9973fd56a4de5e85a632400c85f0.zip
Improve keyword comments a little.
-rw-r--r--compiler/rustc_span/src/symbol.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 5f81d36a74e..11f271af0b7 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -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.
@@ -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.
-
         // "Lifetime keywords": regular keywords with a leading `'`.
         // Matching predicates: none
         UnderscoreLifetime: "'_",