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:
parent
1d284af117
commit
fd7a159710
91 changed files with 287 additions and 329 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue