From 85aad52ce8b2de4d6b7119812d1daa8717f4b23d Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 27 Dec 2024 17:58:16 +0000 Subject: Make sure there are no registered constraints from creating universal region vids --- compiler/rustc_borrowck/src/type_check/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/rustc_borrowck/src') diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index c29f3033dd0..f918f005a9b 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -140,6 +140,12 @@ pub(crate) fn type_check<'a, 'tcx>( &mut constraints, ); + let pre_obligations = infcx.take_registered_region_obligations(); + assert!( + pre_obligations.is_empty(), + "there should be no incoming region obligations = {pre_obligations:#?}", + ); + debug!(?normalized_inputs_and_output); let mut typeck = TypeChecker { -- cgit 1.4.1-3-g733a5