Rollup merge of #137302 - compiler-errors:stray-drop-regions, r=matthewjasper
Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck Fixes #137288. See the comment I left on the probe. I'm not totally sure why this depends on *both* an unconstrained type parameter in the impl and a type error for the self type, but I think the fix is at least theoretically well motivated. r? ```@matthewjasper```
This commit is contained in:
commit
3a04ec8c56
4 changed files with 42 additions and 9 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue