File tree 2 files changed +3
-3
lines changed
src/tools/clippy/clippy_lints/src
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
92
92
// be sure we have `self` parameter in this function
93
93
if let AssocItemKind :: Fn { has_self : true } = trait_item. kind {
94
94
trait_self_ty =
95
- Some ( TraitRef :: identity ( cx. tcx , trait_item. id . def_id . to_def_id ( ) ) . self_ty ( ) ) ;
95
+ Some ( TraitRef :: identity ( cx. tcx , trait_item. id . def_id . to_def_id ( ) ) . self_ty ( ) . skip_binder ( ) ) ;
96
96
}
97
97
}
98
98
}
Original file line number Diff line number Diff line change @@ -2061,7 +2061,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
2061
2061
then {
2062
2062
let first_arg_span = first_arg_ty. span;
2063
2063
let first_arg_ty = hir_ty_to_ty( cx. tcx, first_arg_ty) ;
2064
- let self_ty = TraitRef :: identity( cx. tcx, item. def_id. to_def_id( ) ) . self_ty( ) ;
2064
+ let self_ty = TraitRef :: identity( cx. tcx, item. def_id. to_def_id( ) ) . self_ty( ) . skip_binder ( ) ;
2065
2065
wrong_self_convention:: check(
2066
2066
cx,
2067
2067
& item. ident. name. as_str( ) ,
@@ -2078,7 +2078,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
2078
2078
if item. ident. name == sym:: new;
2079
2079
if let TraitItemKind :: Fn ( _, _) = item. kind;
2080
2080
let ret_ty = return_ty( cx, item. hir_id( ) ) ;
2081
- let self_ty = TraitRef :: identity( cx. tcx, item. def_id. to_def_id( ) ) . self_ty( ) ;
2081
+ let self_ty = TraitRef :: identity( cx. tcx, item. def_id. to_def_id( ) ) . self_ty( ) . skip_binder ( ) ;
2082
2082
if !contains_ty( cx. tcx, ret_ty, self_ty) ;
2083
2083
2084
2084
then {
You can’t perform that action at this time.
0 commit comments