Skip to content

Commit

Permalink
Correctly mark the span of captured arguments in format_args!()
Browse files Browse the repository at this point in the history
It should only include the identifier, or misspelling suggestions will be wrong.
  • Loading branch information
ChayimFriedman2 committed Feb 16, 2022
1 parent 9f75aff commit dcdff60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/write.rs
Expand Up @@ -453,7 +453,7 @@ impl SimpleFormatArgs {
}
}
},
ArgumentNamed(n) => {
ArgumentNamed(n, _) => {
if let Some(x) = self.named.iter_mut().find(|x| x.0 == n) {
match x.1.as_slice() {
// A non-empty format string has been seen already.
Expand Down

0 comments on commit dcdff60

Please sign in to comment.