mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
e8e9510219
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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |