Skip to content

Commit cb27d40

Browse files
committed
Use tidy to sort sym::* items
1 parent 13c46fd commit cb27d40

File tree

2 files changed

+64
-74
lines changed

2 files changed

+64
-74
lines changed

compiler/rustc_macros/src/symbols.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,6 @@ fn symbols_with_errors(input: TokenStream) -> (TokenStream, Vec<syn::Error>) {
190190
let mut symbols_stream = quote! {};
191191
let mut prefill_stream = quote! {};
192192
let mut entries = Entries::with_capacity(input.keywords.len() + input.symbols.len() + 10);
193-
let mut prev_key: Option<(Span, String)> = None;
194-
195-
let mut check_order = |span: Span, s: &str, errors: &mut Errors| {
196-
if let Some((prev_span, ref prev_str)) = prev_key {
197-
if s < prev_str {
198-
errors.error(span, format!("Symbol `{s}` must precede `{prev_str}`"));
199-
errors.error(prev_span, format!("location of previous symbol `{prev_str}`"));
200-
}
201-
}
202-
prev_key = Some((span, s.to_string()));
203-
};
204193

205194
// Generate the listed keywords.
206195
for keyword in input.keywords.iter() {
@@ -219,7 +208,6 @@ fn symbols_with_errors(input: TokenStream) -> (TokenStream, Vec<syn::Error>) {
219208
// Generate the listed symbols.
220209
for symbol in input.symbols.iter() {
221210
let name = &symbol.name;
222-
check_order(symbol.name.span(), &name.to_string(), &mut errors);
223211

224212
let value = match &symbol.value {
225213
Value::SameAsName => name.to_string(),

0 commit comments

Comments
 (0)