Auto merge of #102903 - compiler-errors:region-var-leak, r=jackh726
Assert if inference vars are leaking from `InferCtxt::fully_resolve` `InferCtxt::fully_resolve` shouldn't return unresolved inference vars without us at least being aware of it, so make it an assertion now. This should only happen in cases where we used to be returning `ReEmpty`... cc `@jackh726`
This commit is contained in:
commit
6365e5ad9f
1 changed files with 6 additions and 1 deletions
|
|
@ -1469,7 +1469,12 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
* except during the writeback phase.
|
||||
*/
|
||||
|
||||
resolve::fully_resolve(self, value)
|
||||
let value = resolve::fully_resolve(self, value);
|
||||
assert!(
|
||||
value.as_ref().map_or(true, |value| !value.needs_infer()),
|
||||
"`{value:?}` is not fully resolved"
|
||||
);
|
||||
value
|
||||
}
|
||||
|
||||
pub fn replace_bound_vars_with_fresh_vars<T>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue