Remove is_any_keyword methods.
They're dodgy, covering all the keywords, including weak ones, and edition-specific ones without considering the edition. They have a single use in rustfmt. This commit changes that use to `is_reserved_ident`, which is a much more widely used alternative and is good enough, judging by the lack of effect on the test suite.
This commit is contained in:
@@ -928,11 +928,6 @@ impl Token {
|
||||
self.is_non_raw_ident_where(Ident::is_path_segment_keyword)
|
||||
}
|
||||
|
||||
/// Don't use this unless you're doing something very loose and heuristic-y.
|
||||
pub fn is_any_keyword(&self) -> bool {
|
||||
self.is_non_raw_ident_where(Ident::is_any_keyword)
|
||||
}
|
||||
|
||||
/// Returns true for reserved identifiers used internally for elided lifetimes,
|
||||
/// unnamed method parameters, crate root module, error recovery etc.
|
||||
pub fn is_special_ident(&self) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user