1
Fork 0

Fix uninlined_format_args for some compiler crates

Convert all the crates that have had their diagnostic migration
completed (except save_analysis because that will be deleted soon and
apfloat because of the licensing problem).
This commit is contained in:
nils 2022-12-19 10:31:55 +01:00 committed by Nilstrieb
parent 1d284af117
commit fd7a159710
91 changed files with 287 additions and 329 deletions

View file

@ -447,7 +447,7 @@ impl<'a> Parser<'a> {
Some(pos)
} else {
let pos = self.to_span_index(pos);
let description = format!("expected `'}}'`, found `{:?}`", maybe);
let description = format!("expected `'}}'`, found `{maybe:?}`");
let label = "expected `}`".to_owned();
let (note, secondary_label) = if c == '}' {
(
@ -471,12 +471,12 @@ impl<'a> Parser<'a> {
None
}
} else {
let description = format!("expected `{:?}` but string was terminated", c);
let description = format!("expected `{c:?}` but string was terminated");
// point at closing `"`
let pos = self.input.len() - if self.append_newline { 1 } else { 0 };
let pos = self.to_span_index(pos);
if c == '}' {
let label = format!("expected `{:?}`", c);
let label = format!("expected `{c:?}`");
let (note, secondary_label) = if c == '}' {
(
Some(
@ -497,7 +497,7 @@ impl<'a> Parser<'a> {
should_be_replaced_with_positional_argument: false,
});
} else {
self.err(description, format!("expected `{:?}`", c), pos.to(pos));
self.err(description, format!("expected `{c:?}`"), pos.to(pos));
}
None
}