rust/tests
bors e0b25c5a64 Auto merge of #11998 - cocodery:fix/issue11762, r=llogiq
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
2023-12-22 17:01:17 +00:00
..
test_utils
ui Auto merge of #11998 - cocodery:fix/issue11762, r=llogiq 2023-12-22 17:01:17 +00:00
ui-cargo Merge remote-tracking branch 'upstream/master' into rustup 2023-12-05 17:29:25 +01:00
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2023-12-01 18:06:03 +01:00
ui-toml Add test for indexing_slicing_index and modify related test 2023-12-22 20:31:48 +08:00
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs
dogfood.rs
headers.rs Tolerate hidden, binary files in tests/ 2023-12-02 13:32:21 +00:00
integration.rs Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs
workspace.rs