]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/early.rs
fix issues in unused lint
[rust.git] / compiler / rustc_lint / src / early.rs
index 3901751c79fb0853646685d88a56f04dcf947256..337a19dd024d2fec195601c77de253036df847bf 100644 (file)
@@ -248,13 +248,9 @@ fn visit_generics(&mut self, g: &'a ast::Generics) {
     }
 
     fn visit_where_predicate(&mut self, p: &'a ast::WherePredicate) {
-        use rustc_ast::{WhereBoundPredicate, WherePredicate};
-        if let WherePredicate::BoundPredicate(WhereBoundPredicate { bounded_ty, .. }) = p &&
-            let ast::TyKind::BareFn(b) = &bounded_ty.kind &&
-            b.generic_params.len() > 0 {
-                return;
-        }
+        lint_callback!(self, enter_where_predicate, p);
         ast_visit::walk_where_predicate(self, p);
+        lint_callback!(self, exit_where_predicate, p);
     }
 
     fn visit_poly_trait_ref(&mut self, t: &'a ast::PolyTraitRef) {