about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-27 20:26:31 +0000
committerbors <bors@rust-lang.org>2023-11-27 20:26:31 +0000
commit003e910760ef75196ca26e29c4fc83c2f418f693 (patch)
tree775488d63f5c72bd1f7dc414b67d09c5400fa1e6 /tests/rustdoc-js-std/parser-errors.js
parentcaa73941f853a324ee0526387b1bd09526decf50 (diff)
parent3e83a521e45fb6221099673f6d295f0e59b0ecf2 (diff)
downloadrust-003e910760ef75196ca26e29c4fc83c2f418f693.tar.gz
rust-003e910760ef75196ca26e29c4fc83c2f418f693.zip
Auto merge of #11817 - y21:ptr_arg_mut_ref, r=Alexendoo
[`ptr_arg`]: recognize methods that also exist on slices

Fixes #11816

Not a new lint, just a very small improvement to the existing `ptr_arg` lint which would have caught the linked issue.

The problem was that the lint checks if a `Vec`-specific method was called, that is, if the receiver is `Vec<_>`.
This is the case for `len` and `is_empty`, however these methods also exist on slices so we can still lint there.
This logic exists in a different lint, so we can just reuse that here.

Interestingly, there was even a comment up top that explained what it should have been doing, but the logic for it just wasn't there?

changelog: [`ptr_arg`]: recognize methods that also exist on slices

<sub>Also, this is my 100th PR to clippy 🎉 </sub>
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions