]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/inherent_impl.rs
Merge commit '4911ab124c481430672a3833b37075e6435ec34d' into clippyup
[rust.git] / clippy_lints / src / inherent_impl.rs
index cd034f916cef43b5cd39d1049fdc23cd8f761ffb..4e6bb604785417977320c72d6de98ad623abd59e 100644 (file)
@@ -47,15 +47,15 @@ pub struct MultipleInherentImpl {
 
 impl_lint_pass!(MultipleInherentImpl => [MULTIPLE_INHERENT_IMPL]);
 
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MultipleInherentImpl {
-    fn check_item(&mut self, _: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
+impl<'tcx> LateLintPass<'tcx> for MultipleInherentImpl {
+    fn check_item(&mut self, _: &LateContext<'tcx>, item: &'tcx Item<'_>) {
         if let ItemKind::Impl {
             ref generics,
             of_trait: None,
             ..
         } = item.kind
         {
-            // Remember for each inherent implementation encoutered its span and generics
+            // Remember for each inherent implementation encountered its span and generics
             // but filter out implementations that have generic params (type or lifetime)
             // or are derived from a macro
             if !in_macro(item.span) && generics.params.is_empty() {
@@ -64,7 +64,7 @@ fn check_item(&mut self, _: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
         }
     }
 
-    fn check_crate_post(&mut self, cx: &LateContext<'a, 'tcx>, krate: &'tcx Crate<'_>) {
+    fn check_crate_post(&mut self, cx: &LateContext<'tcx>, krate: &'tcx Crate<'_>) {
         if let Some(item) = krate.items.values().next() {
             // Retrieve all inherent implementations from the crate, grouped by type
             for impls in cx
@@ -81,9 +81,9 @@ fn check_crate_post(&mut self, cx: &LateContext<'a, 'tcx>, krate: &'tcx Crate<'_
                             cx,
                             MULTIPLE_INHERENT_IMPL,
                             *additional_span,
-                            "Multiple implementations of this structure",
-                            |db| {
-                                db.span_note(*initial_span, "First implementation here");
+                            "multiple implementations of this structure",
+                            |diag| {
+                                diag.span_note(*initial_span, "first implementation here");
                             },
                         )
                     })