X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_lint%2Fsrc%2Fearly.rs;h=337a19dd024d2fec195601c77de253036df847bf;hb=b082e80e20475b1ec5b0bd0dd1dac3e6759c8022;hp=3901751c79fb0853646685d88a56f04dcf947256;hpb=7d99866bfc43f34dbdd84f4bf982c48a51b70a99;p=rust.git diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs index 3901751c79f..337a19dd024 100644 --- a/compiler/rustc_lint/src/early.rs +++ b/compiler/rustc_lint/src/early.rs @@ -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) {