Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk

Remove ReEmpty

r? rust-lang/types
This commit is contained in:
bors 2022-09-10 20:54:01 +00:00
commit 42361da5d9

View File

@ -173,7 +173,7 @@ fn check_fn(
(
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)