Skip to content

Commit 0041a4c

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 5791fd7 commit 0041a4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: compiler/rustc_span/src/symbol.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2673,14 +2673,14 @@ impl Symbol {
26732673
self >= kw::As && self <= kw::While
26742674
}
26752675

2676-
fn is_used_keyword_conditional(self, edition: impl FnOnce() -> Edition) -> bool {
2677-
(self >= kw::Async && self <= kw::Dyn) && edition() >= Edition::Edition2018
2678-
}
2679-
26802676
fn is_unused_keyword_always(self) -> bool {
26812677
self >= kw::Abstract && self <= kw::Yield
26822678
}
26832679

2680+
fn is_used_keyword_conditional(self, edition: impl FnOnce() -> Edition) -> bool {
2681+
(self >= kw::Async && self <= kw::Dyn) && edition() >= Edition::Edition2018
2682+
}
2683+
26842684
fn is_unused_keyword_conditional(self, edition: impl Copy + FnOnce() -> Edition) -> bool {
26852685
self == kw::Gen && edition().at_least_rust_2024()
26862686
|| self == kw::Try && edition().at_least_rust_2018()

0 commit comments

Comments
 (0)