@@ -43,7 +43,7 @@ fn get_trait_predicates_for_trait_id<'tcx>(
43
43
for ( pred, _) in generics. predicates {
44
44
if_chain ! {
45
45
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) ) ;
47
47
if let Some ( trait_def_id) = trait_id;
48
48
if trait_def_id == trait_pred. trait_ref. def_id;
49
49
then {
@@ -61,7 +61,7 @@ fn get_projection_pred<'tcx>(
61
61
) -> Option < ProjectionPredicate < ' tcx > > {
62
62
generics. predicates . iter ( ) . find_map ( |( proj_pred, _) | {
63
63
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) ) ;
65
65
if projection_pred. projection_ty . substs == pred. trait_ref . substs {
66
66
return Some ( projection_pred) ;
67
67
}
@@ -81,7 +81,7 @@ fn get_args_to_check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Ve
81
81
get_trait_predicates_for_trait_id ( cx, generics, cx. tcx . lang_items ( ) . partial_ord_trait ( ) ) ;
82
82
// Trying to call erase_late_bound_regions on fn_sig.inputs() gives the following error
83
83
// 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 ( ) ) ;
85
85
inputs_output
86
86
. iter ( )
87
87
. rev ( )
@@ -112,7 +112,7 @@ fn check_arg<'tcx>(cx: &LateContext<'tcx>, arg: &'tcx Expr<'tcx>) -> Option<(Spa
112
112
if let ExprKind :: Closure ( _, _fn_decl, body_id, span, _) = arg. kind;
113
113
if let ty:: Closure ( _def_id, substs) = & cx. typeck_results( ) . node_type( arg. hir_id) . kind( ) ;
114
114
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) ;
116
116
if ty. is_unit( ) ;
117
117
then {
118
118
if_chain! {
0 commit comments