rust/clippy_utils/src
bors 967f172e25 Auto merge of #9635 - smoelius:fix-9386-bug, r=Jarcho
Fix bug introduced by #9386

#9386 introduced a potential out-of-bounds array access. Specifically, a location returned by `local_assignments` could have  [`location.statement_index` equal to `mir.basic_blocks[location.block].statements.len()`](b8a9a507bf/clippy_utils/src/mir/mod.rs (L129)), in which case the location would refer to the block terminator:
b8a9a507bf/clippy_lints/src/dereference.rs (L1204-L1206)
I suspect the bug is not triggerable now, because of checks leading up to where it occurs. But a future code change could make it triggerable. Hence, it should be fixed.

r? `@Jarcho`

changelog: none
2022-10-20 15:18:31 +00:00
..
ast_utils Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
mir Fix bug in referent_used_exactly_once 2022-10-12 09:21:08 -04:00
ast_utils.rs Rename AssocItemKind::TyAlias to AssocItemKind::Type 2022-10-10 02:31:37 +00:00
attrs.rs Fix adjacent code 2022-10-07 05:07:44 -04:00
check_proc_macro.rs ImplItemKind::TyAlias => ImplItemKind::Type 2022-10-09 07:09:57 +00:00
comparisons.rs Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
consts.rs Use the correct type when comparing nested constants. 2022-10-10 15:33:49 -04:00
diagnostics.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
eager_or_lazy.rs Don't suggest moving tuple structs with a significant drop to late evaluation. 2022-10-08 11:23:05 -04:00
higher.rs Merge commit 'd9ddce8a22' into clippyup 2022-06-04 13:34:07 +02:00
hir_utils.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
lib.rs Merge remote-tracking branch 'upstream/master' into rustup 2022-10-20 16:39:27 +02:00
macros.rs Add unused_format_specs lint 2022-10-17 11:36:05 +00:00
msrvs.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
numeric_literal.rs [unnecessary_cast] Do not lint negative hexadecimal literals when cast as float 2022-10-08 16:15:18 +02:00
paths.rs Fix adjacent code 2022-10-15 07:03:29 -04:00
ptr.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
qualify_min_const_fn.rs Rollup merge of #102675 - ouz-a:mir-technical-debt, r=oli-obk 2022-10-08 14:38:18 +02:00
source.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
str_utils.rs Merge commit '0eff589afc' into clippyup 2021-12-30 15:10:43 +01:00
sugg.rs Merge remote-tracking branch 'upstream/master' into rustup 2022-10-20 16:39:27 +02:00
sym_helper.rs Merge commit '928e72dd10' into clippyup 2021-02-25 11:25:22 +01:00
ty.rs Change InferCtxtBuilder from enter to build 2022-10-07 07:10:40 -05:00
usage.rs Change InferCtxtBuilder from enter to build 2022-10-07 07:10:40 -05:00
visitors.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00