Move is_used_keyword_conditional
.
So the order of the `Symbol::is_*` predicates match the order of the keywords list.
This commit is contained in:
parent
10236fbe7b
commit
a29e875b63
1 changed files with 4 additions and 4 deletions
|
@ -2697,14 +2697,14 @@ impl Symbol {
|
|||
self >= kw::As && self <= kw::While
|
||||
}
|
||||
|
||||
fn is_used_keyword_conditional(self, edition: impl FnOnce() -> Edition) -> bool {
|
||||
(self >= kw::Async && self <= kw::Dyn) && edition() >= Edition::Edition2018
|
||||
}
|
||||
|
||||
fn is_unused_keyword_always(self) -> bool {
|
||||
self >= kw::Abstract && self <= kw::Yield
|
||||
}
|
||||
|
||||
fn is_used_keyword_conditional(self, edition: impl FnOnce() -> Edition) -> bool {
|
||||
(self >= kw::Async && self <= kw::Dyn) && edition() >= Edition::Edition2018
|
||||
}
|
||||
|
||||
fn is_unused_keyword_conditional(self, edition: impl Copy + FnOnce() -> Edition) -> bool {
|
||||
self == kw::Gen && edition().at_least_rust_2024()
|
||||
|| self == kw::Try && edition().at_least_rust_2018()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue