diff --git a/compiler/rustc_trait_selection/src/solve/overflow.rs b/compiler/rustc_trait_selection/src/solve/overflow.rs index 8d73a83aec96e..fdd6adb681be4 100644 --- a/compiler/rustc_trait_selection/src/solve/overflow.rs +++ b/compiler/rustc_trait_selection/src/solve/overflow.rs @@ -36,7 +36,7 @@ impl OverflowData { #[inline] pub(super) fn has_overflow(&self, depth: usize) -> bool { - self.current_limit.value_within_limit(depth + self.additional_depth) + !self.current_limit.value_within_limit(depth + self.additional_depth) } /// Updating the current limit when hitting overflow.