Fix overflow and cycle bound for ProofTreeVisitor.

This commit is contained in:
Gavin Gray 2023-11-13 16:36:01 +01:00
parent 1ab2bcda43
commit 60d99ab883

View File

@ -58,7 +58,7 @@ pub fn visit_nested<V: ProofTreeVisitor<'tcx>>(
visitor: &mut V,
) -> ControlFlow<V::BreakTy> {
// HACK: An arbitrary cutoff to avoid dealing with overflow and cycles.
if self.goal.depth >= 10 {
if self.goal.depth <= 10 {
let infcx = self.goal.infcx;
infcx.probe(|_| {
let mut instantiated_goals = vec![];