Skip to content

Commit 9d11933

Browse files
authored
Rollup merge of #106392 - compiler-errors:new-trait-solver-overflow, r=lcnr
`has_overflow` only if value is *not* within limit New solver forgot a not operator, I think.
2 parents 83b11f7 + b2317a6 commit 9d11933

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)