Skip to content

Commit a395610

Browse files
committed
Auto merge of #88533 - oli-obk:tait_🧊, r=spastorino
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`
2 parents 29ef6cf + 43738c6 commit a395610

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Diff for: compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
8282
.find(|ur_vid| self.eval_equal(vid, **ur_vid))
8383
.and_then(|ur_vid| self.definitions[*ur_vid].external_name)
8484
.unwrap_or(infcx.tcx.lifetimes.re_root_empty),
85-
ty::ReLateBound(..) => region,
86-
ty::ReStatic => region,
87-
_ => {
88-
infcx.tcx.sess.delay_span_bug(
89-
span,
90-
&format!("unexpected concrete region in borrowck: {:?}", region),
91-
);
92-
region
93-
}
85+
_ => region,
9486
});
9587

9688
debug!(?universal_concrete_type, ?universal_substs);

0 commit comments

Comments
 (0)