about summary refs log tree commit diff
path: root/clippy_lints/src/misc_early
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2024-04-04 19:52:55 +0200
committerPhilipp Krones <hello@philkrones.com>2024-04-04 19:52:55 +0200
commit0ae4a048c6fa9c84d169e1bba8747661099b2111 (patch)
tree38f22313a66bf2bba76bd4b98bb8d675d71e4e72 /clippy_lints/src/misc_early
parent53e31dc45cecb671c664dd13685cfa9dc832b336 (diff)
Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into clippy-subtree-update
Diffstat (limited to 'clippy_lints/src/misc_early')
-rw-r--r--clippy_lints/src/misc_early/builtin_type_shadow.rs2
-rw-r--r--clippy_lints/src/misc_early/literal_suffix.rs4
-rw-r--r--clippy_lints/src/misc_early/mod.rs2
-rw-r--r--clippy_lints/src/misc_early/redundant_pattern.rs2
-rw-r--r--clippy_lints/src/misc_early/unneeded_field_pattern.rs4
5 files changed, 7 insertions, 7 deletions
diff --git a/clippy_lints/src/misc_early/builtin_type_shadow.rs b/clippy_lints/src/misc_early/builtin_type_shadow.rs
index 9f6b0bdc7a4..662f7cd8500 100644
--- a/clippy_lints/src/misc_early/builtin_type_shadow.rs
+++ b/clippy_lints/src/misc_early/builtin_type_shadow.rs
@@ -12,7 +12,7 @@ pub(super) fn check(cx: &EarlyContext<'_>, param: &GenericParam) {
                 cx,
                 BUILTIN_TYPE_SHADOW,
                 param.ident.span,
-                &format!("this generic shadows the built-in type `{}`", prim_ty.name()),
+                format!("this generic shadows the built-in type `{}`", prim_ty.name()),
             );
         }
     }
diff --git a/clippy_lints/src/misc_early/literal_suffix.rs b/clippy_lints/src/misc_early/literal_suffix.rs
index eda4376f200..e0a5e401a50 100644
--- a/clippy_lints/src/misc_early/literal_suffix.rs
+++ b/clippy_lints/src/misc_early/literal_suffix.rs
@@ -16,7 +16,7 @@ pub(super) fn check(cx: &EarlyContext<'_>, lit_span: Span, lit_snip: &str, suffi
                 cx,
                 SEPARATED_LITERAL_SUFFIX,
                 lit_span,
-                &format!("{sugg_type} type suffix should not be separated by an underscore"),
+                format!("{sugg_type} type suffix should not be separated by an underscore"),
                 "remove the underscore",
                 format!("{}{suffix}", &lit_snip[..maybe_last_sep_idx]),
                 Applicability::MachineApplicable,
@@ -26,7 +26,7 @@ pub(super) fn check(cx: &EarlyContext<'_>, lit_span: Span, lit_snip: &str, suffi
                 cx,
                 UNSEPARATED_LITERAL_SUFFIX,
                 lit_span,
-                &format!("{sugg_type} type suffix should be separated by an underscore"),
+                format!("{sugg_type} type suffix should be separated by an underscore"),
                 "add an underscore",
                 format!("{}_{suffix}", &lit_snip[..=maybe_last_sep_idx]),
                 Applicability::MachineApplicable,
diff --git a/clippy_lints/src/misc_early/mod.rs b/clippy_lints/src/misc_early/mod.rs
index abe5b00e888..2f5499d7656 100644
--- a/clippy_lints/src/misc_early/mod.rs
+++ b/clippy_lints/src/misc_early/mod.rs
@@ -394,7 +394,7 @@ impl EarlyLintPass for MiscEarlyLints {
                             cx,
                             DUPLICATE_UNDERSCORE_ARGUMENT,
                             *correspondence,
-                            &format!(
+                            format!(
                                 "`{arg_name}` already exists, having another argument having almost the same \
                                  name makes code comprehension and documentation more difficult"
                             ),
diff --git a/clippy_lints/src/misc_early/redundant_pattern.rs b/clippy_lints/src/misc_early/redundant_pattern.rs
index d7bb0616acb..d5b5b2bf2dd 100644
--- a/clippy_lints/src/misc_early/redundant_pattern.rs
+++ b/clippy_lints/src/misc_early/redundant_pattern.rs
@@ -12,7 +12,7 @@ pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) {
                 cx,
                 REDUNDANT_PATTERN,
                 pat.span,
-                &format!(
+                format!(
                     "the `{} @ _` pattern can be written as just `{}`",
                     ident.name, ident.name,
                 ),
diff --git a/clippy_lints/src/misc_early/unneeded_field_pattern.rs b/clippy_lints/src/misc_early/unneeded_field_pattern.rs
index 676e5d40bb7..cb305cf5582 100644
--- a/clippy_lints/src/misc_early/unneeded_field_pattern.rs
+++ b/clippy_lints/src/misc_early/unneeded_field_pattern.rs
@@ -27,7 +27,7 @@ pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) {
                 pat.span,
                 "all the struct fields are matched to a wildcard pattern, consider using `..`",
                 None,
-                &format!("try with `{type_name} {{ .. }}` instead"),
+                format!("try with `{type_name} {{ .. }}` instead"),
             );
             return;
         }
@@ -63,7 +63,7 @@ pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) {
                             "you matched a field with a wildcard pattern, consider using `..` \
                              instead",
                             None,
-                            &format!("try with `{type_name} {{ {}, .. }}`", normal[..].join(", ")),
+                            format!("try with `{type_name} {{ {}, .. }}`", normal[..].join(", ")),
                         );
                     }
                 }