Skip to content

Commit b2317a6

Browse files
has_overflow only if value is *not* within limit
1 parent 23b1cc1 commit b2317a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_trait_selection/src/solve/overflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl OverflowData {
3636

3737
#[inline]
3838
pub(super) fn has_overflow(&self, depth: usize) -> bool {
39-
self.current_limit.value_within_limit(depth + self.additional_depth)
39+
!self.current_limit.value_within_limit(depth + self.additional_depth)
4040
}
4141

4242
/// Updating the current limit when hitting overflow.

0 commit comments

Comments
 (0)