Skip to content

Commit 4546f5d

Browse files
authored
Rollup merge of rust-lang#99987 - Alexendoo:parse-format-position-span, r=fee1-dead
Always include a position span in `rustc_parse_format::Argument` Moves the spans from the `Position` enum to always be included in the `Argument` struct. Doesn't make any changes to use it in rustc, but it will be useful for some upcoming Clippy lints
2 parents 119247a + cd13574 commit 4546f5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/write.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ impl SimpleFormatArgs {
441441
};
442442

443443
match arg.position {
444-
ArgumentIs(n, _) | ArgumentImplicitlyIs(n) => {
444+
ArgumentIs(n) | ArgumentImplicitlyIs(n) => {
445445
if self.unnamed.len() <= n {
446446
// Use a dummy span to mark all unseen arguments.
447447
self.unnamed.resize_with(n, || vec![DUMMY_SP]);
@@ -462,7 +462,7 @@ impl SimpleFormatArgs {
462462
}
463463
}
464464
},
465-
ArgumentNamed(n, _) => {
465+
ArgumentNamed(n) => {
466466
let n = Symbol::intern(n);
467467
if let Some(x) = self.named.iter_mut().find(|x| x.0 == n) {
468468
match x.1.as_slice() {

0 commit comments

Comments
 (0)