rust-clippy/clippy_utils
bors e8e9510219 Auto merge of #11002 - y21:issue9422, r=Jarcho
teach `eager_or_lazy` about panicky arithmetic operations

Fixes #9422
Fixes #9814
Fixes #11793

It's a bit sad that we have to do this because arithmetic operations seemed to me like the prime example where a closure would not be necessary, but this has "side effects" (changes behavior when going from lazy to eager) as some of these panic on overflow/underflow if compiled with `-Coverflow-checks` (which is the default in debug mode).
Given the number of backlinks in the mentioned issues, this seems to be a FP that is worth fixing, probably.

changelog: [`unnecessary_lazy_evaluations`]: don't lint if closure has panicky arithmetic operations
2023-11-17 18:53:15 +00:00
..
src Auto merge of #11002 - y21:issue9422, r=Jarcho 2023-11-17 18:53:15 +00:00
Cargo.toml Bump Clippy version -> 0.1.76 2023-11-16 19:02:33 +01:00