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
|
@ -175,7 +175,7 @@ impl SymbolPath {
|
|||
fn finish(mut self, hash: u64) -> String {
|
||||
self.finalize_pending_component();
|
||||
// E = end name-sequence
|
||||
let _ = write!(self.result, "17h{:016x}E", hash);
|
||||
let _ = write!(self.result, "17h{hash:016x}E");
|
||||
self.result
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolPrinter<'tcx> {
|
|||
self = self.print_type(ty)?;
|
||||
self.write_str("; ")?;
|
||||
if let Some(size) = size.kind().try_to_bits(self.tcx().data_layout.pointer_size) {
|
||||
write!(self, "{}", size)?
|
||||
write!(self, "{size}")?
|
||||
} else if let ty::ConstKind::Param(param) = size.kind() {
|
||||
self = param.print(self)?
|
||||
} else {
|
||||
|
|
|
@ -269,8 +269,7 @@ fn compute_symbol_name<'tcx>(
|
|||
|
||||
debug_assert!(
|
||||
rustc_demangle::try_demangle(&symbol).is_ok(),
|
||||
"compute_symbol_name: `{}` cannot be demangled",
|
||||
symbol
|
||||
"compute_symbol_name: `{symbol}` cannot be demangled"
|
||||
);
|
||||
|
||||
symbol
|
||||
|
|
|
@ -74,7 +74,7 @@ impl SymbolNamesTest<'_> {
|
|||
tcx.sess.emit_err(TestOutput {
|
||||
span: attr.span,
|
||||
kind: Kind::DemanglingAlt,
|
||||
content: format!("{:#}", demangling),
|
||||
content: format!("{demangling:#}"),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,11 +126,11 @@ fn encode_const<'tcx>(
|
|||
if value < zero {
|
||||
s.push('n')
|
||||
};
|
||||
let _ = write!(s, "{}", value);
|
||||
let _ = write!(s, "{value}");
|
||||
}
|
||||
|
||||
fn push_unsigned_value<T: Display>(s: &mut String, value: T) {
|
||||
let _ = write!(s, "{}", value);
|
||||
let _ = write!(s, "{value}");
|
||||
}
|
||||
|
||||
if let Some(scalar_int) = c.kind().try_to_scalar_int() {
|
||||
|
|
|
@ -609,7 +609,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
|
|||
bits = val.unsigned_abs();
|
||||
}
|
||||
|
||||
let _ = write!(self.out, "{:x}_", bits);
|
||||
let _ = write!(self.out, "{bits:x}_");
|
||||
}
|
||||
|
||||
// FIXME(valtrees): Remove the special case for `str`
|
||||
|
@ -637,7 +637,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
|
|||
|
||||
// FIXME(eddyb) use a specialized hex-encoding loop.
|
||||
for byte in s.bytes() {
|
||||
let _ = write!(self.out, "{:02x}", byte);
|
||||
let _ = write!(self.out, "{byte:02x}");
|
||||
}
|
||||
|
||||
self.push("_");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue