Skip to content

Commit a29e875

Browse files
committed
Move is_used_keyword_conditional.
So the order of the `Symbol::is_*` predicates match the order of the keywords list.
1 parent 10236fb commit a29e875

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_span/src/symbol.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2697,14 +2697,14 @@ impl Symbol {
26972697
self >= kw::As && self <= kw::While
26982698
}
26992699

2700-
fn is_used_keyword_conditional(self, edition: impl FnOnce() -> Edition) -> bool {
2701-
(self >= kw::Async && self <= kw::Dyn) && edition() >= Edition::Edition2018
2702-
}
2703-
27042700
fn is_unused_keyword_always(self) -> bool {
27052701
self >= kw::Abstract && self <= kw::Yield
27062702
}
27072703

2704+
fn is_used_keyword_conditional(self, edition: impl FnOnce() -> Edition) -> bool {
2705+
(self >= kw::Async && self <= kw::Dyn) && edition() >= Edition::Edition2018
2706+
}
2707+
27082708
fn is_unused_keyword_conditional(self, edition: impl Copy + FnOnce() -> Edition) -> bool {
27092709
self == kw::Gen && edition().at_least_rust_2024()
27102710
|| self == kw::Try && edition().at_least_rust_2018()

0 commit comments

Comments
 (0)