Skip to content

Commit

Permalink
Auto merge of rust-lang#98559 - jackh726:remove-reempty, r=oli-obk
Browse files Browse the repository at this point in the history
Remove ReEmpty

r? rust-lang/types
  • Loading branch information
bors committed Sep 10, 2022
2 parents 98bf99e + b640eaa commit 42361da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/needless_pass_by_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 42361da

Please sign in to comment.