e865dca4d7
fix: `manual_memcpy` wrong indexing for multi dimensional arrays fixes: #9334 This PR fixes an invalid suggestion for multi-dimensional arrays. For example, ```rust let src = vec![vec![0; 5]; 5]; let mut dst = vec![0; 5]; for i in 0..5 { dst[i] = src[i][i]; } ``` For the above code, Clippy suggests `dst.copy_from_slice(&src[i]);`, but it is not compilable because `i` is only used to loop the array. I adjusted it so that Clippy `manual_memcpy` works properly for multi-dimensional arrays. changelog: [`manual_memcpy`]: Fixes invalid indexing suggestions for multi-dimensional arrays |
||
---|---|---|
.. | ||
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 |