@@ -8,7 +8,7 @@ use rustc_hir::FnRetTy::Return;
8
8
use rustc_hir:: {
9
9
BareFnTy , BodyId , FnDecl , GenericArg , GenericBound , GenericParam , GenericParamKind , Generics , ImplItem ,
10
10
ImplItemKind , Item , ItemKind , LangItem , Lifetime , LifetimeName , ParamName , PolyTraitRef , TraitBoundModifier ,
11
- TraitFn , TraitItem , TraitItemKind , Ty , TyKind , WhereClause , WherePredicate ,
11
+ TraitFn , TraitItem , TraitItemKind , Ty , TyKind , WherePredicate ,
12
12
} ;
13
13
use rustc_lint:: { LateContext , LateLintPass } ;
14
14
use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
@@ -130,7 +130,7 @@ fn check_fn_inner<'tcx>(
130
130
span : Span ,
131
131
report_extra_lifetimes : bool ,
132
132
) {
133
- if span. from_expansion ( ) || has_where_lifetimes ( cx, & generics. where_clause ) {
133
+ if span. from_expansion ( ) || has_where_lifetimes ( cx, generics) {
134
134
return ;
135
135
}
136
136
@@ -445,8 +445,8 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
445
445
446
446
/// Are any lifetimes mentioned in the `where` clause? If so, we don't try to
447
447
/// reason about elision.
448
- fn has_where_lifetimes < ' tcx > ( cx : & LateContext < ' tcx > , where_clause : & ' tcx WhereClause < ' _ > ) -> bool {
449
- for predicate in where_clause . predicates {
448
+ fn has_where_lifetimes < ' tcx > ( cx : & LateContext < ' tcx > , generics : & ' tcx Generics < ' _ > ) -> bool {
449
+ for predicate in generics . predicates {
450
450
match * predicate {
451
451
WherePredicate :: RegionPredicate ( ..) => return true ,
452
452
WherePredicate :: BoundPredicate ( ref pred) => {
0 commit comments