@@ -4,7 +4,7 @@ use rustc_hir::intravisit::FnKind;
44use rustc_hir:: { Body , FnDecl } ;
55use rustc_infer:: infer:: TyCtxtInferExt ;
66use rustc_lint:: { LateContext , LateLintPass } ;
7- use rustc_middle:: ty:: { self , AliasTy , Clause , EarlyBinder , PredicateKind } ;
7+ use rustc_middle:: ty:: { self , AliasTy , Clause , PredicateKind } ;
88use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
99use rustc_span:: def_id:: LocalDefId ;
1010use rustc_span:: { sym, Span } ;
@@ -64,10 +64,9 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
6464 }
6565 let ret_ty = return_ty ( cx, cx. tcx . hir ( ) . local_def_id_to_hir_id ( fn_def_id) . expect_owner ( ) ) ;
6666 if let ty:: Alias ( ty:: Opaque , AliasTy { def_id, substs, .. } ) = * ret_ty. kind ( ) {
67- let preds = cx. tcx . explicit_item_bounds ( def_id) ;
67+ let preds = cx. tcx . bound_explicit_item_bounds ( def_id) ;
6868 let mut is_future = false ;
69- for & ( p, _span) in preds {
70- let p = EarlyBinder ( p) . subst ( cx. tcx , substs) ;
69+ for ( p, _span) in preds. subst_iter_copied ( cx. tcx , substs) {
7170 if let Some ( trait_pred) = p. to_opt_poly_trait_pred ( ) {
7271 if Some ( trait_pred. skip_binder ( ) . trait_ref . def_id ) == cx. tcx . lang_items ( ) . future_trait ( ) {
7372 is_future = true ;
0 commit comments