1
Fork 0

Make evaluate_obligation not succeed unconditionally if it registered new hidden types for opaque types

This commit is contained in:
Oli Scherer 2022-06-30 14:23:31 +00:00
parent ade2a96ff1
commit 84fc551664
8 changed files with 31 additions and 11 deletions

View file

@ -891,6 +891,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
.region_constraints_added_in_snapshot(&snapshot.undo_snapshot)
}
pub fn opaque_types_added_in_snapshot(&self, snapshot: &CombinedSnapshot<'a, 'tcx>) -> bool {
self.inner.borrow().undo_log.opaque_types_in_snapshot(&snapshot.undo_snapshot)
}
pub fn add_given(&self, sub: ty::Region<'tcx>, sup: ty::RegionVid) {
self.inner.borrow_mut().unwrap_region_constraints().add_given(sub, sup);
}