1
Fork 0

leak_check: remove unused codepath

This commit is contained in:
lcnr 2023-05-23 16:32:59 +02:00
parent 578bcbc2b4
commit 200ed9f8cd
6 changed files with 9 additions and 42 deletions

View file

@ -200,7 +200,7 @@ fn overlap_within_probe<'cx, 'tcx>(
// We disable the leak when creating the `snapshot` by using
// `infcx.probe_maybe_disable_leak_check`.
if infcx.leak_check(true, snapshot).is_err() {
if infcx.leak_check(snapshot).is_err() {
debug!("overlap: leak check failed");
return None;
}

View file

@ -563,7 +563,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
self.infcx.probe(|snapshot| -> Result<EvaluationResult, OverflowError> {
let result = op(self)?;
match self.infcx.leak_check(true, snapshot) {
match self.infcx.leak_check(snapshot) {
Ok(()) => {}
Err(_) => return Ok(EvaluatedToErr),
}