]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rust-analyzer/crates/hir-ty/src/tls.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / src / tools / rust-analyzer / crates / hir-ty / src / tls.rs
index 92711a24fe39fdc317328f7c76894c859ef76e64..b7e6ee6740be7c74dfdc134168f1cec746310a6a 100644 (file)
@@ -67,12 +67,12 @@ impl DebugContext<'_> {
         let trait_ref = projection_ty.trait_ref(self.0);
         let trait_params = trait_ref.substitution.as_slice(Interner);
         let self_ty = trait_ref.self_type_parameter(Interner);
-        write!(fmt, "<{:?} as {}", self_ty, trait_name)?;
+        write!(fmt, "<{self_ty:?} as {trait_name}")?;
         if trait_params.len() > 1 {
             write!(
                 fmt,
                 "<{}>",
-                trait_params[1..].iter().format_with(", ", |x, f| f(&format_args!("{:?}", x))),
+                trait_params[1..].iter().format_with(", ", |x, f| f(&format_args!("{x:?}"))),
             )?;
         }
         write!(fmt, ">::{}", type_alias_data.name)?;
@@ -83,7 +83,7 @@ impl DebugContext<'_> {
             write!(
                 fmt,
                 "<{}>",
-                proj_params.iter().format_with(", ", |x, f| f(&format_args!("{:?}", x))),
+                proj_params.iter().format_with(", ", |x, f| f(&format_args!("{x:?}"))),
             )?;
         }
 
@@ -105,9 +105,9 @@ impl DebugContext<'_> {
             }
         };
         match def {
-            CallableDefId::FunctionId(_) => write!(fmt, "{{fn {}}}", name),
+            CallableDefId::FunctionId(_) => write!(fmt, "{{fn {name}}}"),
             CallableDefId::StructId(_) | CallableDefId::EnumVariantId(_) => {
-                write!(fmt, "{{ctor {}}}", name)
+                write!(fmt, "{{ctor {name}}}")
             }
         }
     }