@@ -32,7 +32,7 @@ symbols! {
3232 Keywords {
3333 // Special reserved identifiers used internally for elided lifetimes,
3434 // unnamed method parameters, crate root module, error recovery etc.
35- // Matching predicates: `is_any_keyword`, ` is_special`/`is_reserved`
35+ // Matching predicates: `is_special`/`is_reserved`
3636 //
3737 // Notes about `kw::Empty`:
3838 // - Its use can blur the lines between "empty symbol" and "no symbol".
@@ -48,7 +48,7 @@ symbols! {
4848 Underscore : "_" ,
4949
5050 // Keywords that are used in stable Rust.
51- // Matching predicates: `is_any_keyword`, ` is_used_keyword_always`/`is_reserved`
51+ // Matching predicates: `is_used_keyword_always`/`is_reserved`
5252 As : "as" ,
5353 Break : "break" ,
5454 Const : "const" ,
@@ -86,7 +86,7 @@ symbols! {
8686 While : "while" ,
8787
8888 // Keywords that are used in unstable Rust or reserved for future use.
89- // Matching predicates: `is_any_keyword`, ` is_unused_keyword_always`/`is_reserved`
89+ // Matching predicates: `is_unused_keyword_always`/`is_reserved`
9090 Abstract : "abstract" ,
9191 Become : "become" ,
9292 Box : "box" ,
@@ -101,27 +101,27 @@ symbols! {
101101 Yield : "yield" ,
102102
103103 // Edition-specific keywords that are used in stable Rust.
104- // Matching predicates: `is_any_keyword`, ` is_used_keyword_conditional`/`is_reserved` (if
104+ // Matching predicates: `is_used_keyword_conditional`/`is_reserved` (if
105105 // the edition suffices)
106106 Async : "async" , // >= 2018 Edition only
107107 Await : "await" , // >= 2018 Edition only
108108 Dyn : "dyn" , // >= 2018 Edition only
109109
110110 // Edition-specific keywords that are used in unstable Rust or reserved for future use.
111- // Matching predicates: `is_any_keyword`, ` is_unused_keyword_conditional`/`is_reserved` (if
111+ // Matching predicates: `is_unused_keyword_conditional`/`is_reserved` (if
112112 // the edition suffices)
113113 Gen : "gen" , // >= 2024 Edition only
114114 Try : "try" , // >= 2018 Edition only
115115
116116 // NOTE: When adding new keywords, consider adding them to the ui/parser/raw/raw-idents.rs test.
117117
118118 // "Lifetime keywords": regular keywords with a leading `'`.
119- // Matching predicates: `is_any_keyword`
119+ // Matching predicates: none
120120 UnderscoreLifetime : "'_" ,
121121 StaticLifetime : "'static" ,
122122
123123 // Weak keywords, have special meaning only in specific contexts.
124- // Matching predicates: `is_any_keyword`
124+ // Matching predicates: none
125125 Auto : "auto" ,
126126 Builtin : "builtin" ,
127127 Catch : "catch" ,
@@ -2677,11 +2677,6 @@ pub mod sym {
26772677}
26782678
26792679impl Symbol {
2680- /// Don't use this unless you're doing something very loose and heuristic-y.
2681- pub fn is_any_keyword ( self ) -> bool {
2682- self >= kw:: As && self <= kw:: Yeet
2683- }
2684-
26852680 fn is_special ( self ) -> bool {
26862681 self <= kw:: Underscore
26872682 }
@@ -2738,11 +2733,6 @@ impl Symbol {
27382733}
27392734
27402735impl Ident {
2741- /// Don't use this unless you're doing something very loose and heuristic-y.
2742- pub fn is_any_keyword ( self ) -> bool {
2743- self . name . is_any_keyword ( )
2744- }
2745-
27462736 /// Returns `true` for reserved identifiers used internally for elided lifetimes,
27472737 /// unnamed method parameters, crate root module, error recovery etc.
27482738 pub fn is_special ( self ) -> bool {
0 commit comments