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
cc @oli-obk since I think you were refactoring something here recently?
[INFO] [stdout] error: literal out of range for `i8`
[INFO] [stdout] --> src/lib.rs:25:29
[INFO] [stdout] |
[INFO] [stdout] 10 | assert_eq!(checked_expr!(-(-128_i8)), None);
[INFO] [stdout] | ^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = note: the literal `128_i8` does not fit into the type `i8` whose range is `-128..=127`
[INFO] [stdout] = help: consider using the type `u8` instead
[INFO] [stdout] = note: `#[deny(overflowing_literals)]` on by default
Activity
ehuss commentedon Mar 2, 2025
This bisects to #136393
What's interesting is that the expanded code:
fires the lint on stable, but the proc-macro does not.
oli-obk commentedon Mar 2, 2025
yea I was just reading the proc macro source and was wondering how this ever worked. Turns out
128_i8overflows into-128_i8💀oli-obk commentedon Mar 2, 2025
So I guess I made another accidental bugfix with these refactorings, yay
apiraino commentedon Mar 3, 2025
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-high
wesleywiser commentedon Mar 13, 2025
Discussed briefly in the compiler team triage meeting. It looks like this is an expected fix to lint behavior.
Should we mention this in release notes for 1.86?
apiraino commentedon Mar 27, 2025
closing as accepted change