@@ -27,20 +27,22 @@ symbols! {
27
27
// (e.g. `_`).
28
28
//
29
29
// If you modify this list, adjust any relevant `Symbol::{is,can_be}_*`
30
- // predicates and `used_keywords`. (This should rarely be necessary if
31
- // the keywords are kept in alphabetic order.) Also consider adding new
32
- // keywords to the `ui/parser/raw/raw-idents.rs` test.
30
+ // predicates and `used_keywords`. Also consider adding new keywords to the
31
+ // `ui/parser/raw/raw-idents.rs` test.
33
32
Keywords {
34
33
// Special reserved identifiers used internally for elided lifetimes,
35
34
// unnamed method parameters, crate root module, error recovery etc.
36
35
// Matching predicates: `is_special`/`is_reserved`
36
+ // tidy-alphabetical-start
37
+ DollarCrate : "$crate" ,
37
38
Empty : "" ,
38
39
PathRoot : "{{root}}" ,
39
- DollarCrate : "$crate" ,
40
40
Underscore : "_" ,
41
+ // tidy-alphabetical-end
41
42
42
43
// Keywords that are used in stable Rust.
43
44
// Matching predicates: `is_used_keyword_always`/`is_reserved`
45
+ // tidy-alphabetical-start
44
46
As : "as" ,
45
47
Break : "break" ,
46
48
Const : "const" ,
@@ -76,9 +78,11 @@ symbols! {
76
78
Use : "use" ,
77
79
Where : "where" ,
78
80
While : "while" ,
81
+ // tidy-alphabetical-end
79
82
80
83
// Keywords that are used in unstable Rust or reserved for future use.
81
84
// Matching predicates: `is_unused_keyword_always`/`is_reserved`
85
+ // tidy-alphabetical-start
82
86
Abstract : "abstract" ,
83
87
Become : "become" ,
84
88
Box : "box" ,
@@ -91,39 +95,48 @@ symbols! {
91
95
Unsized : "unsized" ,
92
96
Virtual : "virtual" ,
93
97
Yield : "yield" ,
98
+ // tidy-alphabetical-end
94
99
95
100
// Edition-specific keywords that are used in stable Rust.
96
101
// Matching predicates: `is_used_keyword_conditional`/`is_reserved` (if
97
102
// the edition suffices)
103
+ // tidy-alphabetical-start
98
104
Async : "async" , // >= 2018 Edition only
99
105
Await : "await" , // >= 2018 Edition only
100
106
Dyn : "dyn" , // >= 2018 Edition only
107
+ // tidy-alphabetical-end
101
108
102
109
// Edition-specific keywords that are used in unstable Rust or reserved for future use.
103
110
// Matching predicates: `is_unused_keyword_conditional`/`is_reserved` (if
104
111
// the edition suffices)
112
+ // tidy-alphabetical-start
105
113
Gen : "gen" , // >= 2024 Edition only
106
114
Try : "try" , // >= 2018 Edition only
115
+ // tidy-alphabetical-end
107
116
108
117
// "Lifetime keywords": regular keywords with a leading `'`.
109
118
// Matching predicates: none
110
- UnderscoreLifetime : "'_" ,
119
+ // tidy-alphabetical-start
111
120
StaticLifetime : "'static" ,
121
+ UnderscoreLifetime : "'_" ,
122
+ // tidy-alphabetical-end
112
123
113
124
// Weak keywords, have special meaning only in specific contexts.
114
125
// Matching predicates: none
126
+ // tidy-alphabetical-start
115
127
Auto : "auto" ,
116
128
Builtin : "builtin" ,
117
129
Catch : "catch" ,
130
+ ContractEnsures : "contract_ensures" ,
131
+ ContractRequires : "contract_requires" ,
118
132
Default : "default" ,
119
133
MacroRules : "macro_rules" ,
120
134
Raw : "raw" ,
121
135
Reuse : "reuse" ,
122
- ContractEnsures : "contract_ensures" ,
123
- ContractRequires : "contract_requires" ,
124
136
Safe : "safe" ,
125
137
Union : "union" ,
126
138
Yeet : "yeet" ,
139
+ // tidy-alphabetical-end
127
140
}
128
141
129
142
// Pre-interned symbols that can be referred to with `rustc_span::sym::*`.
0 commit comments