@@ -32,14 +32,14 @@ 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 Empty : "" ,
3737 PathRoot : "{{root}}" ,
3838 DollarCrate : "$crate" ,
3939 Underscore : "_" ,
4040
4141 // Keywords that are used in stable Rust.
42- // Matching predicates: `is_any_keyword`, ` is_used_keyword_always`/`is_reserved`
42+ // Matching predicates: `is_used_keyword_always`/`is_reserved`
4343 As : "as" ,
4444 Break : "break" ,
4545 Const : "const" ,
@@ -77,7 +77,7 @@ symbols! {
7777 While : "while" ,
7878
7979 // Keywords that are used in unstable Rust or reserved for future use.
80- // Matching predicates: `is_any_keyword`, ` is_unused_keyword_always`/`is_reserved`
80+ // Matching predicates: `is_unused_keyword_always`/`is_reserved`
8181 Abstract : "abstract" ,
8282 Become : "become" ,
8383 Box : "box" ,
@@ -92,27 +92,27 @@ symbols! {
9292 Yield : "yield" ,
9393
9494 // Edition-specific keywords that are used in stable Rust.
95- // Matching predicates: `is_any_keyword`, ` is_used_keyword_conditional`/`is_reserved` (if
95+ // Matching predicates: `is_used_keyword_conditional`/`is_reserved` (if
9696 // the edition suffices)
9797 Async : "async" , // >= 2018 Edition only
9898 Await : "await" , // >= 2018 Edition only
9999 Dyn : "dyn" , // >= 2018 Edition only
100100
101101 // Edition-specific keywords that are used in unstable Rust or reserved for future use.
102- // Matching predicates: `is_any_keyword`, ` is_unused_keyword_conditional`/`is_reserved` (if
102+ // Matching predicates: `is_unused_keyword_conditional`/`is_reserved` (if
103103 // the edition suffices)
104104 Gen : "gen" , // >= 2024 Edition only
105105 Try : "try" , // >= 2018 Edition only
106106
107107 // NOTE: When adding new keywords, consider adding them to the ui/parser/raw/raw-idents.rs test.
108108
109109 // "Lifetime keywords": regular keywords with a leading `'`.
110- // Matching predicates: `is_any_keyword`
110+ // Matching predicates: none
111111 UnderscoreLifetime : "'_" ,
112112 StaticLifetime : "'static" ,
113113
114114 // Weak keywords, have special meaning only in specific contexts.
115- // Matching predicates: `is_any_keyword`
115+ // Matching predicates: none
116116 Auto : "auto" ,
117117 Builtin : "builtin" ,
118118 Catch : "catch" ,
@@ -2653,11 +2653,6 @@ pub mod sym {
26532653}
26542654
26552655impl Symbol {
2656- /// Don't use this unless you're doing something very loose and heuristic-y.
2657- pub fn is_any_keyword ( self ) -> bool {
2658- self >= kw:: As && self <= kw:: Yeet
2659- }
2660-
26612656 fn is_special ( self ) -> bool {
26622657 self <= kw:: Underscore
26632658 }
@@ -2714,11 +2709,6 @@ impl Symbol {
27142709}
27152710
27162711impl Ident {
2717- /// Don't use this unless you're doing something very loose and heuristic-y.
2718- pub fn is_any_keyword ( self ) -> bool {
2719- self . name . is_any_keyword ( )
2720- }
2721-
27222712 /// Returns `true` for reserved identifiers used internally for elided lifetimes,
27232713 /// unnamed method parameters, crate root module, error recovery etc.
27242714 pub fn is_special ( self ) -> bool {
0 commit comments