Skip to content

Commit 15754f5

Browse files
committed
Move enum definition closer to its usage.
1 parent df7fd11 commit 15754f5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/rustc_builtin_macros/src/format.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,17 @@ pub fn make_format_args(
267267
})
268268
};
269269

270+
let num_explicit_args = args.len();
271+
let mut used = vec![false; num_explicit_args];
272+
let mut invalid_refs = Vec::new();
273+
let mut numeric_refences_to_named_arg = Vec::new();
274+
270275
enum ArgRef<'a> {
271276
Index(usize),
272277
Name(&'a str, Option<Span>),
273278
}
274279
use ArgRef::*;
275280

276-
let num_explicit_args = args.len();
277-
let mut used = vec![false; num_explicit_args];
278-
let mut invalid_refs = Vec::new();
279-
let mut numeric_refences_to_named_arg = Vec::new();
280-
281281
let mut lookup_arg = |arg: ArgRef<'_>,
282282
span: Option<Span>,
283283
used_as: PositionUsedAs,

0 commit comments

Comments
 (0)