Skip to content

Commit

Permalink
Auto merge of #88533 - oli-obk:tait_🧊, r=spastorino
Browse files Browse the repository at this point in the history
Concrete regions can show up in mir borrowck if the originated from there

We used to not encounter them here, because we took regions from typeck's opaque type resolution by renumbering them. We don't do that anymore. Instead mir borrock does all the logic, and it can handle concrete regions just fine, as long as it created them itself.

fixes #83190 which was introduced by #87287

r? `@spastorino`
  • Loading branch information
bors committed Aug 31, 2021
2 parents 29ef6cf + 43738c6 commit a395610
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
.find(|ur_vid| self.eval_equal(vid, **ur_vid))
.and_then(|ur_vid| self.definitions[*ur_vid].external_name)
.unwrap_or(infcx.tcx.lifetimes.re_root_empty),
ty::ReLateBound(..) => region,
ty::ReStatic => region,
_ => {
infcx.tcx.sess.delay_span_bug(
span,
&format!("unexpected concrete region in borrowck: {:?}", region),
);
region
}
_ => region,
});

debug!(?universal_concrete_type, ?universal_substs);
Expand Down

0 comments on commit a395610

Please sign in to comment.