about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-14 21:55:37 +0200
committerGitHub <noreply@github.com>2025-04-14 21:55:37 +0200
commitefca25fddcc7344280fa2b1e52dd31479f4a38f9 (patch)
treed554190df31069165eacaa65561c6517afc7dd7c /compiler/rustc_pattern_analysis/src/errors.rs
parent990039ec53d5bffe0ec77391e00f0e5be05924e8 (diff)
parented5f31ab01d41a01b7206eafdf97b458dc41141a (diff)
downloadrust-efca25fddcc7344280fa2b1e52dd31479f4a38f9.tar.gz
rust-efca25fddcc7344280fa2b1e52dd31479f4a38f9.zip
Rollup merge of #139745 - thaliaarchi:iter-unused-clone-copy, r=joboet
Avoid unused clones in `Cloned<I>` and `Copied<I>`

Avoid cloning in `Cloned<I>` or copying in `Copied<I>` when elements are only needed by reference or not at all. There is already some precedent for this, given that `__iterator_get_unchecked` is implemented, which can skip elements. The reduced clones are technically observable by a user impl of `Clone`.

r? libs-api
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions