Fix clippy
This commit is contained in:
parent
d37f1091e8
commit
2a9a9ca829
2 changed files with 3 additions and 3 deletions
|
@ -92,7 +92,7 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
|
||||||
// be sure we have `self` parameter in this function
|
// be sure we have `self` parameter in this function
|
||||||
if let AssocItemKind::Fn { has_self: true } = trait_item.kind {
|
if let AssocItemKind::Fn { has_self: true } = trait_item.kind {
|
||||||
trait_self_ty =
|
trait_self_ty =
|
||||||
Some(TraitRef::identity(cx.tcx, trait_item.id.def_id.to_def_id()).self_ty());
|
Some(TraitRef::identity(cx.tcx, trait_item.id.def_id.to_def_id()).self_ty().skip_binder());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2061,7 +2061,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
|
||||||
then {
|
then {
|
||||||
let first_arg_span = first_arg_ty.span;
|
let first_arg_span = first_arg_ty.span;
|
||||||
let first_arg_ty = hir_ty_to_ty(cx.tcx, first_arg_ty);
|
let first_arg_ty = hir_ty_to_ty(cx.tcx, first_arg_ty);
|
||||||
let self_ty = TraitRef::identity(cx.tcx, item.def_id.to_def_id()).self_ty();
|
let self_ty = TraitRef::identity(cx.tcx, item.def_id.to_def_id()).self_ty().skip_binder();
|
||||||
wrong_self_convention::check(
|
wrong_self_convention::check(
|
||||||
cx,
|
cx,
|
||||||
&item.ident.name.as_str(),
|
&item.ident.name.as_str(),
|
||||||
|
@ -2078,7 +2078,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
|
||||||
if item.ident.name == sym::new;
|
if item.ident.name == sym::new;
|
||||||
if let TraitItemKind::Fn(_, _) = item.kind;
|
if let TraitItemKind::Fn(_, _) = item.kind;
|
||||||
let ret_ty = return_ty(cx, item.hir_id());
|
let ret_ty = return_ty(cx, item.hir_id());
|
||||||
let self_ty = TraitRef::identity(cx.tcx, item.def_id.to_def_id()).self_ty();
|
let self_ty = TraitRef::identity(cx.tcx, item.def_id.to_def_id()).self_ty().skip_binder();
|
||||||
if !contains_ty(cx.tcx, ret_ty, self_ty);
|
if !contains_ty(cx.tcx, ret_ty, self_ty);
|
||||||
|
|
||||||
then {
|
then {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue