You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arithmetic_overflow is missed after x >>= n when overflow checks are on #164191
I expected to see this happen: the same result in both builds. 0xff + c overflows (c is 5), so the deny-by-default arithmetic_overflow lint should reject it either way.
Instead, this happened: the debug build compiles, and the -O build fails:
error: this arithmetic operation will overflow
--> a.rs:4:5
|
4 | 0xff + c
| ^^^^^^^^ attempt to compute `u8::MAX + 5_u8`, which would overflow
|
= note: `#[deny(arithmetic_overflow)]` on by default
Activity
yashaggarwal85d commentedon Oct 26, 2026
yashaggarwal85d commentedon Oct 26, 2026