]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/same_name_method.rs
Auto merge of #9539 - Jarcho:ice_9445, r=flip1995
[rust.git] / clippy_lints / src / same_name_method.rs
index 04d9ee7d912f3501220e48fefbae5ef3555aa690..dead36e3bea8f124d00e128cebc06372a0ee9bcc 100644 (file)
@@ -47,6 +47,7 @@ struct ExistingName {
 }
 
 impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
+    #[expect(clippy::too_many_lines)]
     fn check_crate_post(&mut self, cx: &LateContext<'tcx>) {
         let mut map = FxHashMap::<Res, ExistingName>::default();
 
@@ -107,7 +108,7 @@ fn check_crate_post(&mut self, cx: &LateContext<'tcx>) {
                                     |diag| {
                                         diag.span_note(
                                             trait_method_span,
-                                            &format!("existing `{}` defined here", method_name),
+                                            &format!("existing `{method_name}` defined here"),
                                         );
                                     },
                                 );
@@ -150,7 +151,7 @@ fn check_crate_post(&mut self, cx: &LateContext<'tcx>) {
                                         // iterate on trait_spans?
                                         diag.span_note(
                                             trait_spans[0],
-                                            &format!("existing `{}` defined here", method_name),
+                                            &format!("existing `{method_name}` defined here"),
                                         );
                                     },
                                 );