Cleanup opaque type storage after checking impossible predicates.

This commit is contained in:
Camille GILLOT 2022-04-30 20:03:27 +02:00
parent 8492460fa4
commit 6b348257a1

View file

@ -448,6 +448,9 @@ pub fn impossible_predicates<'tcx>(
let errors = fulfill_cx.select_all_or_error(&infcx);
// Clean up after ourselves
let _ = infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types();
!errors.is_empty()
});
debug!("impossible_predicates = {:?}", result);