about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/astconv/generics.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-25 23:17:39 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2023-07-25 23:20:28 +0200
commitc64ef5e070ee7ae7fb73de2bec06fb7498a9af83 (patch)
treec07f2178069538d7ae7a7a1349ccf6627bdc840e /compiler/rustc_hir_analysis/src/astconv/generics.rs
parent8327047b23dc1eb150fdfb42177939388661eb6d (diff)
downloadrust-c64ef5e070ee7ae7fb73de2bec06fb7498a9af83.tar.gz
rust-c64ef5e070ee7ae7fb73de2bec06fb7498a9af83.zip
inline format!() args from rustc_codegen_llvm to the end (4)
r? @WaffleLapkin
Diffstat (limited to 'compiler/rustc_hir_analysis/src/astconv/generics.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/astconv/generics.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/generics.rs b/compiler/rustc_hir_analysis/src/astconv/generics.rs
index e81c61d80ed..1372cc896be 100644
--- a/compiler/rustc_hir_analysis/src/astconv/generics.rs
+++ b/compiler/rustc_hir_analysis/src/astconv/generics.rs
@@ -81,7 +81,7 @@ fn generic_arg_mismatch_err(
                         err.span_suggestion(
                             tcx.def_span(src_def_id),
                             "consider changing this type parameter to a const parameter",
-                            format!("const {}: {}", param_name, param_type),
+                            format!("const {param_name}: {param_type}"),
                             Applicability::MaybeIncorrect,
                         );
                     };
@@ -102,7 +102,7 @@ fn generic_arg_mismatch_err(
                 err.span_suggestion(
                     arg.span(),
                     "array type provided where a `usize` was expected, try",
-                    format!("{{ {} }}", snippet),
+                    format!("{{ {snippet} }}"),
                     Applicability::MaybeIncorrect,
                 );
             }
@@ -130,7 +130,7 @@ fn generic_arg_mismatch_err(
         } else {
             (arg.descr(), param.kind.descr())
         };
-        err.note(format!("{} arguments must be provided before {} arguments", first, last));
+        err.note(format!("{first} arguments must be provided before {last} arguments"));
         if let Some(help) = help {
             err.help(help);
         }
@@ -304,7 +304,7 @@ pub fn create_args_for_parent_generic_args<'tcx, 'a>(
                                         "reorder the arguments: {}: `<{}>`",
                                         param_types_present
                                             .into_iter()
-                                            .map(|ord| format!("{}s", ord))
+                                            .map(|ord| format!("{ord}s"))
                                             .collect::<Vec<String>>()
                                             .join(", then "),
                                         ordered_params