diff options
| author | bors <bors@rust-lang.org> | 2022-11-07 20:47:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-07 20:47:27 +0000 |
| commit | 5857a0174249bd5a9c0daeb4a9fde4a3601d7303 (patch) | |
| tree | 0e662336a1e381462695686c6d648bac7b45d0bc /src/test/rustdoc-ui/coverage/enum-tuple.rs | |
| parent | 213003b8874016aadc61195f049fc2d7e773ccad (diff) | |
| parent | 8bfc8bc5e0210dabd2976edad5bf285a96dcb360 (diff) | |
| download | rust-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 'src/test/rustdoc-ui/coverage/enum-tuple.rs')
0 files changed, 0 insertions, 0 deletions
