about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2024-12-27 18:43:04 -0800
committerGitHub <noreply@github.com>2024-12-27 18:43:04 -0800
commit2d96f2a48fb825e2028c1ee45f3a4ebd941ff8e2 (patch)
tree722c176bb1266597353fe79628bacaf0fb6debdc /compiler/rustc_borrowck/src
parent9aebd28ca75683661fa3e80b1d3f8b390b6826d7 (diff)
parent85aad52ce8b2de4d6b7119812d1daa8717f4b23d (diff)
downloadrust-2d96f2a48fb825e2028c1ee45f3a4ebd941ff8e2.tar.gz
rust-2d96f2a48fb825e2028c1ee45f3a4ebd941ff8e2.zip
Rollup merge of #134827 - compiler-errors:borrowck-nits, r=lqd
Some random region tweaks

Remove a redundant function and add an assertion that I think is useful
Diffstat (limited to 'compiler/rustc_borrowck/src')
-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 {