]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_borrowck/src/diagnostics/region_name.rs
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
[rust.git] / compiler / rustc_borrowck / src / diagnostics / region_name.rs
index 579ce90a760f2e977ee9a0a1e65da7827590c4ca..9233287cf3a75fde48da92820c9c4d52bed5e132 100644 (file)
@@ -202,7 +202,7 @@ pub(crate) fn mir_hir_id(&self) -> hir::HirId {
     /// This is _not_ idempotent. Call `give_region_a_name` when possible.
     pub(crate) fn synthesize_region_name(&self) -> Symbol {
         let c = self.next_region_name.replace_with(|counter| *counter + 1);
-        Symbol::intern(&format!("'{:?}", c))
+        Symbol::intern(&format!("'{c:?}"))
     }
 
     /// Maps from an internal MIR region vid to something that we can
@@ -619,7 +619,7 @@ fn try_match_adt_and_generic_args<'hir>(
                     // programs, so we need to use delay_span_bug here. See #82126.
                     self.infcx.tcx.sess.delay_span_bug(
                         hir_arg.span(),
-                        &format!("unmatched subst and hir arg: found {:?} vs {:?}", kind, hir_arg),
+                        &format!("unmatched subst and hir arg: found {kind:?} vs {hir_arg:?}"),
                     );
                 }
             }
@@ -783,8 +783,7 @@ fn get_future_inner_return_ty(&self, hir_ty: &'tcx hir::Ty<'tcx>) -> &'tcx hir::
         } else {
             span_bug!(
                 hir_ty.span,
-                "bounds from lowered return type of async fn did not match expected format: {:?}",
-                opaque_ty
+                "bounds from lowered return type of async fn did not match expected format: {opaque_ty:?}",
             );
         }
     }