about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/structured_errors
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors')
-rw-r--r--compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs
index 0828fe9e0f2..6be8d72aed2 100644
--- a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs
+++ b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs
@@ -474,7 +474,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 verb
             )
         } else {
-            format!("missing generics for {} `{}`", def_kind, def_path)
+            format!("missing generics for {def_kind} `{def_path}`")
         }
     }
 
@@ -599,7 +599,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 let span = self.path_segment.ident.span;
 
                 // insert a suggestion of the form "Y<'a, 'b>"
-                let sugg = format!("<{}>", suggested_args);
+                let sugg = format!("<{suggested_args}>");
                 debug!("sugg: {:?}", sugg);
 
                 err.span_suggestion_verbose(
@@ -624,7 +624,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 let sugg_suffix =
                     if is_first && (has_non_lt_args || has_bindings) { ", " } else { "" };
 
-                let sugg = format!("{}{}{}", sugg_prefix, suggested_args, sugg_suffix);
+                let sugg = format!("{sugg_prefix}{suggested_args}{sugg_suffix}");
                 debug!("sugg: {:?}", sugg);
 
                 err.span_suggestion_verbose(sugg_span, msg, sugg, Applicability::HasPlaceholders);
@@ -649,7 +649,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 let span = self.path_segment.ident.span;
 
                 // insert a suggestion of the form "Y<T, U>"
-                let sugg = format!("<{}>", suggested_args);
+                let sugg = format!("<{suggested_args}>");
                 debug!("sugg: {:?}", sugg);
 
                 err.span_suggestion_verbose(
@@ -682,7 +682,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                 let sugg_suffix =
                     if is_first && !self.gen_args.bindings.is_empty() { ", " } else { "" };
 
-                let sugg = format!("{}{}{}", sugg_prefix, suggested_args, sugg_suffix);
+                let sugg = format!("{sugg_prefix}{suggested_args}{sugg_suffix}");
                 debug!("sugg: {:?}", sugg);
 
                 err.span_suggestion_verbose(sugg_span, msg, sugg, Applicability::HasPlaceholders);
@@ -1024,7 +1024,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
                     .collect::<Vec<_>>()
                     .join(", ");
 
-                format!(": {}", params)
+                format!(": {params}")
             };
 
             format!(