]> git.lizzy.rs Git - rust.git/commit
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)
commite0c195961653dd41aa70a49379b137f6c816d61f
treec63fb8a058593b1527fbdbe9ebe5dbe449e14051
parenta85c8f33ff0da5192bb44ac52cb838f638ad7c03
parente0b1463e0a0133ae49fc31aab3e7f18882ff00b0
Auto merge of #9592 - c410-f3r:arith, r=Jarcho

[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