]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/const_static_lifetime.rs
don't suggest eliding 'static on associated consts
[rust.git] / clippy_lints / src / const_static_lifetime.rs
index 2872cb127294f955c6921d5018fb6de80affb4bc..66a1634ebce6a57e1476a9b3fb32b660468b5908 100644 (file)
@@ -87,21 +87,5 @@ fn check_item(&mut self, cx: &EarlyContext, item: &Item) {
         }
     }
 
-    fn check_trait_item(&mut self, cx: &EarlyContext, item: &TraitItem) {
-        if !in_macro(item.span) {
-            // Match only constants...
-            if let TraitItemKind::Const(ref var_type, _) = item.node {
-                self.visit_type(var_type, cx);
-            }
-        }
-    }
-
-    fn check_impl_item(&mut self, cx: &EarlyContext, item: &ImplItem) {
-        if !in_macro(item.span) {
-            // Match only constants...
-            if let ImplItemKind::Const(ref var_type, _) = item.node {
-                self.visit_type(var_type, cx);
-            }
-        }
-    }
+    // Don't check associated consts because `'static` cannot be elided on those (issue #2438)
 }