e0b25c5a64
Check whether out of bound when access a known length array with a constant index fixes [Issue#11762](https://github.com/rust-lang/rust-clippy/issues/11762) Issue#11762 points that `Array references with known length are not flagged when indexed out of bounds`. To fix this problem, it is needed to add check for `Expr::Index`. We expand this issue include reference and direct accessing a array. When we access a array with a constant index `off`, and already know the length `size`, if `off >= size`, these code will throw an error, instead rustc's lint checking them or runtime panic happening. changelog: [`out_of_bound_indexing`]: Add check for illegal accessing known length array with a constant index |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
headers.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |