about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-07 20:47:27 +0000
committerbors <bors@rust-lang.org>2022-11-07 20:47:27 +0000
commit5857a0174249bd5a9c0daeb4a9fde4a3601d7303 (patch)
tree0e662336a1e381462695686c6d648bac7b45d0bc /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent213003b8874016aadc61195f049fc2d7e773ccad (diff)
parent8bfc8bc5e0210dabd2976edad5bf285a96dcb360 (diff)
downloadrust-5857a0174249bd5a9c0daeb4a9fde4a3601d7303.tar.gz
rust-5857a0174249bd5a9c0daeb4a9fde4a3601d7303.zip
Auto merge of #8744 - Jarcho:needless_collect_fp, r=llogiq
Extend `needless_collect`

Extends when `is_empty` and `contains` are linted.

`is_empty` will be linted when `<IterTy as Iterator>::Item` is the same as `<CollectTy as IntoIterator>::Item`. This can be a false positive if the `FromIterator` implementation filters out items, but I don't know of any which do that also implement `IntoIterator` with a matching `Item` type.

`contains` will be linted when the argument type is `&<IterTy as Iterator>::Item`. It has the same false positives as `is_empty` with the same note that I know of nothing that actually causes that in practice.

changelog: Lint `needless_collect` when `is_empty` or `contains` is called on some non-std types
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions