From 60d99ab8837e973c0df5fe518a2ed136c8ac0f20 Mon Sep 17 00:00:00 2001 From: Gavin Gray Date: Mon, 13 Nov 2023 16:36:01 +0100 Subject: [PATCH] Fix overflow and cycle bound for ProofTreeVisitor. --- compiler/rustc_trait_selection/src/solve/inspect/analyse.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs b/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs index 69bfdd4688c..951080ac61a 100644 --- a/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs +++ b/compiler/rustc_trait_selection/src/solve/inspect/analyse.rs @@ -58,7 +58,7 @@ pub fn visit_nested>( visitor: &mut V, ) -> ControlFlow { // 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![];