Correctly mark the span of captured arguments in format_args!()

It should only include the identifier, or misspelling suggestions will be wrong.
This commit is contained in:
Chayim Refael Friedman 2022-02-16 00:38:04 +00:00 committed by GitHub
parent 9f75aff391
commit dcdff601fe

View file

@ -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.