mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
003e910760
[`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> |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
headers.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |