Skip to content

Commit 1686129

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 528f746 commit 1686129

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
@@ -2695,14 +2695,14 @@ impl Symbol {
26952695
self >= kw::As && self <= kw::While
26962696
}
26972697

2698-
fn is_used_keyword_conditional(self, edition: impl FnOnce() -> Edition) -> bool {
2699-
(self >= kw::Async && self <= kw::Dyn) && edition() >= Edition::Edition2018
2700-
}
2701-
27022698
fn is_unused_keyword_always(self) -> bool {
27032699
self >= kw::Abstract && self <= kw::Yield
27042700
}
27052701

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

0 commit comments

Comments
 (0)