]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Rollup merge of #106204 - compiler-errors:no-take-opaques-in-compare, r=oli-obk
[rust.git] / compiler / rustc_borrowck / src / diagnostics / region_errors.rs
index cc33ef14756e5fbda6f1254428dcbf2322c3b5d7..e8a4d1c37c1877296151a84dd9e3cd5513716b2b 100644 (file)
@@ -422,7 +422,7 @@ pub(crate) fn report_region_error(
                         );
                         (desc, note)
                     }
-                    _ => panic!("Unexpected type {:?}", ty),
+                    _ => panic!("Unexpected type {ty:?}"),
                 };
                 diag.note(&format!("requirement occurs because of {desc}",));
                 diag.note(&note);
@@ -725,10 +725,10 @@ fn add_static_impl_trait_suggestion(
             let lifetime = if f.has_name() { fr_name.name } else { kw::UnderscoreLifetime };
 
             let arg = match param.param.pat.simple_ident() {
-                Some(simple_ident) => format!("argument `{}`", simple_ident),
+                Some(simple_ident) => format!("argument `{simple_ident}`"),
                 None => "the argument".to_string(),
             };
-            let captures = format!("captures data from {}", arg);
+            let captures = format!("captures data from {arg}");
 
             return nice_region_error::suggest_new_region_bound(
                 self.infcx.tcx,