Skip to content

Commit 9564895

Browse files
committed
Fix uses of TraitRef::identity in clippy and rustdoc
1 parent 9cf9642 commit 9564895

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

clippy_lints/src/escape.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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
}

clippy_lints/src/methods/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)