@@ -43,7 +43,7 @@ fn get_trait_predicates_for_trait_id<'tcx>(
4343 for ( pred, _) in generics. predicates {
4444 if_chain ! {
4545 if let PredicateAtom :: Trait ( poly_trait_pred, _) = pred. skip_binders( ) ;
46- let trait_pred = cx. tcx. erase_late_bound_regions( & ty:: Binder :: bind( poly_trait_pred) ) ;
46+ let trait_pred = cx. tcx. erase_late_bound_regions( ty:: Binder :: bind( poly_trait_pred) ) ;
4747 if let Some ( trait_def_id) = trait_id;
4848 if trait_def_id == trait_pred. trait_ref. def_id;
4949 then {
@@ -61,7 +61,7 @@ fn get_projection_pred<'tcx>(
6161) -> Option < ProjectionPredicate < ' tcx > > {
6262 generics. predicates . iter ( ) . find_map ( |( proj_pred, _) | {
6363 if let ty:: PredicateAtom :: Projection ( proj_pred) = proj_pred. skip_binders ( ) {
64- let projection_pred = cx. tcx . erase_late_bound_regions ( & ty:: Binder :: bind ( proj_pred) ) ;
64+ let projection_pred = cx. tcx . erase_late_bound_regions ( ty:: Binder :: bind ( proj_pred) ) ;
6565 if projection_pred. projection_ty . substs == pred. trait_ref . substs {
6666 return Some ( projection_pred) ;
6767 }
@@ -81,7 +81,7 @@ fn get_args_to_check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Ve
8181 get_trait_predicates_for_trait_id ( cx, generics, cx. tcx . lang_items ( ) . partial_ord_trait ( ) ) ;
8282 // Trying to call erase_late_bound_regions on fn_sig.inputs() gives the following error
8383 // The trait `rustc::ty::TypeFoldable<'_>` is not implemented for `&[&rustc::ty::TyS<'_>]`
84- let inputs_output = cx. tcx . erase_late_bound_regions ( & fn_sig. inputs_and_output ( ) ) ;
84+ let inputs_output = cx. tcx . erase_late_bound_regions ( fn_sig. inputs_and_output ( ) ) ;
8585 inputs_output
8686 . iter ( )
8787 . rev ( )
@@ -112,7 +112,7 @@ fn check_arg<'tcx>(cx: &LateContext<'tcx>, arg: &'tcx Expr<'tcx>) -> Option<(Spa
112112 if let ExprKind :: Closure ( _, _fn_decl, body_id, span, _) = arg. kind;
113113 if let ty:: Closure ( _def_id, substs) = & cx. typeck_results( ) . node_type( arg. hir_id) . kind( ) ;
114114 let ret_ty = substs. as_closure( ) . sig( ) . output( ) ;
115- let ty = cx. tcx. erase_late_bound_regions( & ret_ty) ;
115+ let ty = cx. tcx. erase_late_bound_regions( ret_ty) ;
116116 if ty. is_unit( ) ;
117117 then {
118118 if_chain! {
0 commit comments