You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2025. It is now read-only.
Rollup merge of rust-lang#134253 - nnethercote:overhaul-keywords, r=petrochenkov
Overhaul keyword handling
The compiler's list of keywords has some problems.
- It contains several items that aren't keywords.
- The order isn't quite right in a couple of places.
- Some of the names of predicates relating to keywords are confusing.
- rustdoc and rustfmt have their own (incorrect) versions of the keyword list.
- `AllKeywords` is unnecessarily complex.
r? ```@jieyouxu```
Copy file name to clipboardExpand all lines: compiler/rustc_ast/src/token.rs
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -903,7 +903,8 @@ impl Token {
903
903
self.is_non_raw_ident_where(|id| id.name == kw)
904
904
}
905
905
906
-
/// Returns `true` if the token is a given keyword, `kw` or if `case` is `Insensitive` and this token is an identifier equal to `kw` ignoring the case.
906
+
/// Returns `true` if the token is a given keyword, `kw` or if `case` is `Insensitive` and this
907
+
/// token is an identifier equal to `kw` ignoring the case.
0 commit comments