about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-12-27 17:58:16 +0000
committerMichael Goulet <michael@errs.io>2024-12-27 17:58:16 +0000
commit85aad52ce8b2de4d6b7119812d1daa8717f4b23d (patch)
tree091cf92a191e2f6b9e22f0370d48d621e6573c31 /compiler
parentd6c5a6bd3adcc5bb5f077818432a5e3efb224ec0 (diff)
downloadrust-85aad52ce8b2de4d6b7119812d1daa8717f4b23d.tar.gz
rust-85aad52ce8b2de4d6b7119812d1daa8717f4b23d.zip
Make sure there are no registered constraints from creating universal region vids
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_borrowck/src/type_check/mod.rs6
1 files changed, 6 insertions, 0 deletions
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 {