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.
This commit is contained in:
Matthias Krüger 2023-01-03 17:12:13 +01:00 committed by GitHub
commit 9d1193310f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ pub(super) fn did_overflow(&self) -> bool {
#[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.