mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
Remove ReEmpty
This commit is contained in:
parent
f47a1e24c7
commit
b640eaa71d
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
|
|||
(
|
||||
preds.iter().any(|t| cx.tcx.is_diagnostic_item(sym::Borrow, t.def_id())),
|
||||
!preds.is_empty() && {
|
||||
let ty_empty_region = cx.tcx.mk_imm_ref(cx.tcx.lifetimes.re_root_empty, ty);
|
||||
let ty_empty_region = cx.tcx.mk_imm_ref(cx.tcx.lifetimes.re_erased, ty);
|
||||
preds.iter().all(|t| {
|
||||
let ty_params = t.trait_ref.substs.iter().skip(1).collect::<Vec<_>>();
|
||||
implements_trait(cx, ty_empty_region, t.def_id(), &ty_params)
|
||||
|
|
Loading…
Reference in a new issue