rust-clippy/clippy_utils/src
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
..
ast_utils Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyup 2021-02-25 11:25:22 +01:00
mir Reverse postorder instead of using reversed postorder 2023-09-28 23:50:56 +00:00
ty/type_certainty Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup 2023-11-02 17:35:56 +01:00
ast_utils.rs Add gen blocks to ast and do some broken ast lowering 2023-10-27 13:05:48 +00:00
attrs.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
check_proc_macro.rs Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup 2023-11-02 17:35:56 +01:00
comparisons.rs Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
consts.rs Auto merge of #11002 - y21:issue9422, r=Jarcho 2023-11-17 18:53:15 +00:00
diagnostics.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-11-16 19:02:04 +01:00
eager_or_lazy.rs simplify matching on binop result 2023-11-16 23:05:17 +01:00
higher.rs Clean up after if chain removal 2023-11-10 18:03:13 +00:00
hir_utils.rs Auto merge of #11736 - gernot-ohner:issue-10267, r=flip1995 2023-11-08 09:58:56 +00:00
lib.rs Auto merge of #11802 - dswij:issue-11765, r=xFrednet 2023-11-15 10:15:47 +00:00
macros.rs fix lint failures in clippy 2023-10-16 19:50:31 -07:00
numeric_literal.rs Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
paths.rs implement more types to lint, fix wording 2023-11-11 21:26:50 +00:00
ptr.rs Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
qualify_min_const_fn.rs Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup 2023-11-02 17:35:56 +01:00
source.rs Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup 2023-11-02 17:35:56 +01:00
str_utils.rs Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup 2023-11-02 17:35:56 +01:00
sugg.rs Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb 2023-11-03 14:57:40 +00:00
sym_helper.rs Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyup 2021-02-25 11:25:22 +01:00
ty.rs Merge remote-tracking branch 'upstream/master' into rustup 2023-11-16 19:02:04 +01:00
usage.rs Merge commit '98363cbf6a7c3f8b571a7d92a3c645bb4376e4a6' into clippyup 2023-09-12 18:44:06 +02:00
visitors.rs Merge commit 'b105fb4c39bc1a010807a6c076193cef8d93c109' into clippyup 2023-10-06 17:35:45 +02:00