]> git.lizzy.rs Git - rust.git/commitdiff
Always include a position span in rustc_parse_format::Argument
authorAlex Macleod <alex@macleod.io>
Sun, 31 Jul 2022 15:11:00 +0000 (15:11 +0000)
committerAlex Macleod <alex@macleod.io>
Sun, 31 Jul 2022 15:11:33 +0000 (15:11 +0000)
clippy_lints/src/write.rs

index 3a99d1b417fee1c96373112e6e35d2143ba570f3..32718200c0b3a037a2793855e81d0f835bbddcab 100644 (file)
@@ -441,7 +441,7 @@ fn push(&mut self, arg: rustc_parse_format::Argument<'_>, span: Span) {
         };
 
         match arg.position {
-            ArgumentIs(n, _) | ArgumentImplicitlyIs(n) => {
+            ArgumentIs(n) | ArgumentImplicitlyIs(n) => {
                 if self.unnamed.len() <= n {
                     // Use a dummy span to mark all unseen arguments.
                     self.unnamed.resize_with(n, || vec![DUMMY_SP]);
@@ -462,7 +462,7 @@ fn push(&mut self, arg: rustc_parse_format::Argument<'_>, span: Span) {
                     }
                 }
             },
-            ArgumentNamed(n, _) => {
+            ArgumentNamed(n) => {
                 let n = Symbol::intern(n);
                 if let Some(x) = self.named.iter_mut().find(|x| x.0 == n) {
                     match x.1.as_slice() {