add the leak check to the new solver
This commit is contained in:
parent
04056b5c04
commit
6f9041bd15
2 changed files with 29 additions and 0 deletions
|
@ -137,6 +137,11 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
|||
|
||||
#[instrument(level = "debug", skip(self), ret)]
|
||||
fn compute_external_query_constraints(&self) -> Result<ExternalConstraints<'tcx>, NoSolution> {
|
||||
self.infcx.leak_check(ty::UniverseIndex::ROOT, None).map_err(|e| {
|
||||
debug!(?e, "failed the leak check");
|
||||
NoSolution
|
||||
})?;
|
||||
|
||||
// Cannot use `take_registered_region_obligations` as we may compute the response
|
||||
// inside of a `probe` whenever we have multiple choices inside of the solver.
|
||||
let region_obligations = self.infcx.inner.borrow().region_obligations().to_owned();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue