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
|
@ -597,8 +597,7 @@ impl<Id> Res<Id> {
|
|||
where
|
||||
Id: Debug,
|
||||
{
|
||||
self.opt_def_id()
|
||||
.unwrap_or_else(|| panic!("attempted .def_id() on invalid res: {:?}", self))
|
||||
self.opt_def_id().unwrap_or_else(|| panic!("attempted .def_id() on invalid res: {self:?}"))
|
||||
}
|
||||
|
||||
/// Return `Some(..)` with the `DefId` of this `Res` if it has a ID, else `None`.
|
||||
|
|
|
@ -53,9 +53,8 @@ impl DefPathTable {
|
|||
//
|
||||
// See the documentation for DefPathHash for more information.
|
||||
panic!(
|
||||
"found DefPathHash collision between {:?} and {:?}. \
|
||||
Compilation cannot continue.",
|
||||
def_path1, def_path2
|
||||
"found DefPathHash collision between {def_path1:?} and {def_path2:?}. \
|
||||
Compilation cannot continue."
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -224,7 +223,7 @@ impl DefPath {
|
|||
let mut s = String::with_capacity(self.data.len() * 16);
|
||||
|
||||
for component in &self.data {
|
||||
write!(s, "::{}", component).unwrap();
|
||||
write!(s, "::{component}").unwrap();
|
||||
}
|
||||
|
||||
s
|
||||
|
@ -240,7 +239,7 @@ impl DefPath {
|
|||
for component in &self.data {
|
||||
s.extend(opt_delimiter);
|
||||
opt_delimiter = Some('-');
|
||||
write!(s, "{}", component).unwrap();
|
||||
write!(s, "{component}").unwrap();
|
||||
}
|
||||
|
||||
s
|
||||
|
@ -433,7 +432,7 @@ impl fmt::Display for DefPathData {
|
|||
match self.name() {
|
||||
DefPathDataName::Named(name) => f.write_str(name.as_str()),
|
||||
// FIXME(#70334): this will generate legacy {{closure}}, {{impl}}, etc
|
||||
DefPathDataName::Anon { namespace } => write!(f, "{{{{{}}}}}", namespace),
|
||||
DefPathDataName::Anon { namespace } => write!(f, "{{{{{namespace}}}}}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ impl HirId {
|
|||
|
||||
impl fmt::Display for HirId {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{:?}", self)
|
||||
write!(f, "{self:?}")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue