Rollup merge of #94030 - ChayimFriedman2:issue-94010, r=petrochenkov

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

It should not include the braces, or misspelling suggestions will be wrong.

Fixes #94010.
This commit is contained in:
Matthias Krüger 2022-02-17 06:30:02 +01:00 committed by GitHub
commit ecf3165567

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.