]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #9592 - c410-f3r:arith, r=Jarcho
authorbors <bors@rust-lang.org>
Sun, 20 Nov 2022 22:51:25 +0000 (22:51 +0000)
committerbors <bors@rust-lang.org>
Sun, 20 Nov 2022 22:51:25 +0000 (22:51 +0000)
[arithmetic-side-effects] Detect overflowing associated constants of integers

Triggers the negation of maximum unsigned integers using associated constants. Rustc already handles `-128i8` but doesn't handle `-i8::MAX`.

At the same time, allows stuff like `-1234`.

changelog: FP: [arithmetic-side-effects] Detect overflowing associated constants of integers


Trivial merge