@@ -9,7 +9,7 @@ use rustc_hir::{BindingAnnotation, Expr, ExprKind, FnRetTy, Param, PatKind, QPat
99use rustc_infer:: infer:: TyCtxtInferExt ;
1010use rustc_lint:: { LateContext , LateLintPass } ;
1111use rustc_middle:: ty:: {
12- self , Binder , ClosureArgs , ClosureKind , FnSig , GenericArg , GenericArgKind , ImplPolarity , List , Region , RegionKind ,
12+ self , Binder , ClosureArgs , ClosureKind , FnSig , GenericArg , GenericArgKind , List , Region , RegionKind ,
1313 Ty , TypeVisitableExt , TypeckResults ,
1414} ;
1515use rustc_session:: declare_lint_pass;
@@ -173,7 +173,7 @@ impl<'tcx> LateLintPass<'tcx> for EtaReduction {
173173 if let Ok ( ( ClosureKind :: FnMut , _) ) = cx. tcx . infer_ctxt ( ) . build ( ) . type_implements_fn_trait (
174174 cx. param_env ,
175175 Binder :: bind_with_vars ( callee_ty_adjusted, List :: empty ( ) ) ,
176- ImplPolarity :: Positive ,
176+ ty :: PredicatePolarity :: Positive ,
177177 ) && path_to_local ( callee) . map_or ( false , |l| {
178178 local_used_in ( cx, l, args) || local_used_after_expr ( cx, l, expr)
179179 } ) {
0 commit comments