Skip to content

Commit 85aad52

Browse files
Make sure there are no registered constraints from creating universal region vids
1 parent d6c5a6b commit 85aad52

File tree

1 file changed

+6
-0
lines changed
  • compiler/rustc_borrowck/src/type_check

1 file changed

+6
-0
lines changed

compiler/rustc_borrowck/src/type_check/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ pub(crate) fn type_check<'a, 'tcx>(
140140
&mut constraints,
141141
);
142142

143+
let pre_obligations = infcx.take_registered_region_obligations();
144+
assert!(
145+
pre_obligations.is_empty(),
146+
"there should be no incoming region obligations = {pre_obligations:#?}",
147+
);
148+
143149
debug!(?normalized_inputs_and_output);
144150

145151
let mut typeck = TypeChecker {

0 commit comments

Comments
 (0)