File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed
tools/clippy/clippy_lints/src Expand file tree Collapse file tree 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>(
131131 hir:: GenericBound :: LangItemTrait ( lang_item, span, _, generic_args) => {
132132 let def_id = cx. tcx . require_lang_item ( lang_item, Some ( span) ) ;
133133
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) ) ;
135135
136136 let generic_args = clean_generic_args ( generic_args, cx) ;
137137 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 {
9494 if trait_item. kind == ( AssocItemKind :: Fn { has_self : true } ) {
9595 trait_self_ty = Some (
9696 TraitRef :: identity ( cx. tcx , trait_item. id . owner_id . to_def_id ( ) )
97- . self_ty ( )
98- . skip_binder ( ) ,
97+ . self_ty ( ) ,
9998 ) ;
10099 }
101100 }
Original file line number Diff line number Diff line change @@ -3500,8 +3500,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
35003500 let first_arg_span = first_arg_ty. span;
35013501 let first_arg_ty = hir_ty_to_ty( cx. tcx, first_arg_ty) ;
35023502 let self_ty = TraitRef :: identity( cx. tcx, item. owner_id. to_def_id( ) )
3503- . self_ty( )
3504- . skip_binder( ) ;
3503+ . self_ty( ) ;
35053504 wrong_self_convention:: check(
35063505 cx,
35073506 item. ident. name. as_str( ) ,
@@ -3519,8 +3518,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
35193518 if let TraitItemKind :: Fn ( _, _) = item. kind;
35203519 let ret_ty = return_ty( cx, item. owner_id) ;
35213520 let self_ty = TraitRef :: identity( cx. tcx, item. owner_id. to_def_id( ) )
3522- . self_ty( )
3523- . skip_binder( ) ;
3521+ . self_ty( ) ;
35243522 if !ret_ty. contains( self_ty) ;
35253523
35263524 then {
You can’t perform that action at this time.
0 commit comments