File tree 3 files changed +4
-7
lines changed
tools/clippy/clippy_lints/src
3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ fn clean_generic_bound<'tcx>(
131
131
hir:: GenericBound :: LangItemTrait ( lang_item, span, _, generic_args) => {
132
132
let def_id = cx. tcx . require_lang_item ( lang_item, Some ( span) ) ;
133
133
134
- let trait_ref = ty:: TraitRef :: identity ( cx. tcx , def_id) ;
134
+ let trait_ref = ty:: Binder :: dummy ( ty :: TraitRef :: identity ( cx. tcx , def_id) ) ;
135
135
136
136
let generic_args = clean_generic_args ( generic_args, cx) ;
137
137
let GenericArgs :: AngleBracketed { bindings, .. } = generic_args
Original file line number Diff line number Diff line change @@ -94,8 +94,7 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
94
94
if trait_item. kind == ( AssocItemKind :: Fn { has_self : true } ) {
95
95
trait_self_ty = Some (
96
96
TraitRef :: identity ( cx. tcx , trait_item. id . owner_id . to_def_id ( ) )
97
- . self_ty ( )
98
- . skip_binder ( ) ,
97
+ . self_ty ( ) ,
99
98
) ;
100
99
}
101
100
}
Original file line number Diff line number Diff line change @@ -3500,8 +3500,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
3500
3500
let first_arg_span = first_arg_ty. span;
3501
3501
let first_arg_ty = hir_ty_to_ty( cx. tcx, first_arg_ty) ;
3502
3502
let self_ty = TraitRef :: identity( cx. tcx, item. owner_id. to_def_id( ) )
3503
- . self_ty( )
3504
- . skip_binder( ) ;
3503
+ . self_ty( ) ;
3505
3504
wrong_self_convention:: check(
3506
3505
cx,
3507
3506
item. ident. name. as_str( ) ,
@@ -3519,8 +3518,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
3519
3518
if let TraitItemKind :: Fn ( _, _) = item. kind;
3520
3519
let ret_ty = return_ty( cx, item. owner_id) ;
3521
3520
let self_ty = TraitRef :: identity( cx. tcx, item. owner_id. to_def_id( ) )
3522
- . self_ty( )
3523
- . skip_binder( ) ;
3521
+ . self_ty( ) ;
3524
3522
if !ret_ty. contains( self_ty) ;
3525
3523
3526
3524
then {
You can’t perform that action at this time.
0 commit comments