Fix uses of TraitRef::identity in clippy and rustdoc

This commit is contained in:
Maybe Waffle 2023-04-26 13:48:56 +00:00
parent 9cf96429a7
commit 95648951ea
2 changed files with 3 additions and 6 deletions

View File

@ -94,8 +94,7 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
if trait_item.kind == (AssocItemKind::Fn { has_self: true }) {
trait_self_ty = Some(
TraitRef::identity(cx.tcx, trait_item.id.owner_id.to_def_id())
.self_ty()
.skip_binder(),
.self_ty(),
);
}
}

View File

@ -3500,8 +3500,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
let first_arg_span = first_arg_ty.span;
let first_arg_ty = hir_ty_to_ty(cx.tcx, first_arg_ty);
let self_ty = TraitRef::identity(cx.tcx, item.owner_id.to_def_id())
.self_ty()
.skip_binder();
.self_ty();
wrong_self_convention::check(
cx,
item.ident.name.as_str(),
@ -3519,8 +3518,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
if let TraitItemKind::Fn(_, _) = item.kind;
let ret_ty = return_ty(cx, item.owner_id);
let self_ty = TraitRef::identity(cx.tcx, item.owner_id.to_def_id())
.self_ty()
.skip_binder();
.self_ty();
if !ret_ty.contains(self_ty);
then {