1
Fork 0

Change to ReError(ErrorGuaranteed)

This commit is contained in:
Esteban Küber 2023-02-07 14:55:16 +00:00
parent ffaf2a5c27
commit 861f451235
23 changed files with 70 additions and 61 deletions

View file

@ -786,13 +786,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
}
let Some(ty::ReEarlyBound(e)) = map.get(&region.into()).map(|r| r.expect_region().kind())
else {
tcx
.sess
.delay_span_bug(
return_span,
"expected ReFree to map to ReEarlyBound"
);
return tcx.lifetimes.re_error;
return tcx.re_error_with_message(return_span, "expected ReFree to map to ReEarlyBound")
};
tcx.mk_region(ty::ReEarlyBound(ty::EarlyBoundRegion {
def_id: e.def_id,