From 43738c678799f1cf41b54de4ce169a5dde39d30f Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 31 Aug 2021 14:38:21 +0000 Subject: [PATCH] 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. --- .../src/borrow_check/region_infer/opaque_types.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs b/compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs index e9ab62e1664..12fceeff088 100644 --- a/compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs +++ b/compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs @@ -82,15 +82,7 @@ pub(in crate::borrow_check) fn infer_opaque_types( .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); -- 2.44.0