Skip to content

Commit

Permalink
has_overflow only if value is *not* within limit
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jan 3, 2023
1 parent 23b1cc1 commit b2317a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_trait_selection/src/solve/overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b2317a6

Please sign in to comment.