1
Fork 0

Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck

This commit is contained in:
Michael Goulet 2025-02-20 03:36:58 +00:00
parent f280acf4c7
commit d4609f8d42
4 changed files with 42 additions and 9 deletions

View file

@ -950,7 +950,7 @@ impl<'tcx> InferCtxt<'tcx> {
let inner = self.inner.borrow();
assert!(!UndoLogs::<UndoLog<'_>>::in_snapshot(&inner.undo_log));
let storage = inner.region_constraint_storage.as_ref().expect("regions already resolved");
assert!(storage.data.is_empty());
assert!(storage.data.is_empty(), "{:#?}", storage.data);
// We clone instead of taking because borrowck still wants to use the
// inference context after calling this for diagnostics and the new
// trait solver.