Skip to content

Commit 43738c6

Browse files
committed
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.
1 parent fe37929 commit 43738c6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

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)