Skip to content

Commit 553f649

Browse files
committed
Fix clippy
1 parent b73c8b8 commit 553f649

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tools/clippy/clippy_lints/src/escape.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
9292
// be sure we have `self` parameter in this function
9393
if let AssocItemKind::Fn { has_self: true } = trait_item.kind {
9494
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());
9696
}
9797
}
9898
}

src/tools/clippy/clippy_lints/src/methods/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2061,7 +2061,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
20612061
then {
20622062
let first_arg_span = first_arg_ty.span;
20632063
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();
20652065
wrong_self_convention::check(
20662066
cx,
20672067
&item.ident.name.as_str(),
@@ -2078,7 +2078,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
20782078
if item.ident.name == sym::new;
20792079
if let TraitItemKind::Fn(_, _) = item.kind;
20802080
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();
20822082
if !contains_ty(cx.tcx, ret_ty, self_ty);
20832083

20842084
then {

0 commit comments

Comments
 (0)