@@ -8,7 +8,7 @@ use rustc_hir::FnRetTy::Return;
88use rustc_hir:: {
99 BareFnTy , BodyId , FnDecl , GenericArg , GenericBound , GenericParam , GenericParamKind , Generics , ImplItem ,
1010 ImplItemKind , Item , ItemKind , LangItem , Lifetime , LifetimeName , ParamName , PolyTraitRef , TraitBoundModifier ,
11- TraitFn , TraitItem , TraitItemKind , Ty , TyKind , WhereClause , WherePredicate ,
11+ TraitFn , TraitItem , TraitItemKind , Ty , TyKind , WherePredicate ,
1212} ;
1313use rustc_lint:: { LateContext , LateLintPass } ;
1414use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
@@ -130,7 +130,7 @@ fn check_fn_inner<'tcx>(
130130 span : Span ,
131131 report_extra_lifetimes : bool ,
132132) {
133- if span. from_expansion ( ) || has_where_lifetimes ( cx, & generics. where_clause ) {
133+ if span. from_expansion ( ) || has_where_lifetimes ( cx, generics) {
134134 return ;
135135 }
136136
@@ -445,8 +445,8 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
445445
446446/// Are any lifetimes mentioned in the `where` clause? If so, we don't try to
447447/// 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 {
450450 match * predicate {
451451 WherePredicate :: RegionPredicate ( ..) => return true ,
452452 WherePredicate :: BoundPredicate ( ref pred) => {
0 commit comments