Open
Description
Summary
manual_memcpy
doesn't trigger when an iterator is used within a for
loop.
Lint Name
manual_memcpy
Reproducer
I tried this code:
let src = [0; 64];
let mut dst = [0; 128];
for (i, &val) in src.iter().enumerate() {
dst[i + 64] = val;
}
I expected to see this happen: Pointing out memcpy is being re-implemented.
Instead, this happened: No warnings were emitted.
Version
rustc 1.86.0-nightly (a580b5c37 2025-01-08)
binary: rustc
commit-hash: a580b5c379b4fca50dfe5afc0fc0ce00921e4e00
commit-date: 2025-01-08
host: aarch64-apple-darwin
release: 1.86.0-nightly
LLVM version: 19.1.6