@@ -20,7 +20,7 @@ mod tests;
20
20
21
21
// The proc macro code for this is in `compiler/rustc_macros/src/symbols.rs`.
22
22
symbols ! {
23
- // If you modify this list, adjust `is_any_keyword`, `is_special `,
23
+ // If you modify this list, adjust `is_any_keyword`, `is_reserved_ident `,
24
24
// `is_used_keyword`/`is_unused_keyword` and `AllKeywords`.
25
25
// But this should rarely be necessary if the keywords are kept in alphabetic order.
26
26
Keywords {
@@ -2586,7 +2586,7 @@ impl Symbol {
2586
2586
self >= kw:: As && self <= kw:: Yeet
2587
2587
}
2588
2588
2589
- fn is_special ( self ) -> bool {
2589
+ fn is_reserved_ident ( self ) -> bool {
2590
2590
self == sym:: dollar_crate || self == sym:: underscore
2591
2591
}
2592
2592
@@ -2608,7 +2608,7 @@ impl Symbol {
2608
2608
}
2609
2609
2610
2610
pub fn is_reserved ( self , edition : impl Copy + FnOnce ( ) -> Edition ) -> bool {
2611
- self . is_special ( )
2611
+ self . is_reserved_ident ( )
2612
2612
|| self . is_used_keyword_always ( )
2613
2613
|| self . is_unused_keyword_always ( )
2614
2614
|| self . is_used_keyword_conditional ( edition)
@@ -2648,8 +2648,8 @@ impl Ident {
2648
2648
}
2649
2649
2650
2650
/// Returns `true` for reserved identifiers.
2651
- pub fn is_special ( self ) -> bool {
2652
- self . name . is_special ( )
2651
+ pub fn is_reserved_ident ( self ) -> bool {
2652
+ self . name . is_reserved_ident ( )
2653
2653
}
2654
2654
2655
2655
/// Returns `true` if the token is a keyword used in the language.
0 commit comments