fix #105061, Fix unused_parens issue for higher ranked function pointers
This commit is contained in:
@@ -248,6 +248,12 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
ast_visit::walk_where_predicate(self, p);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user