Check usages in `ptr_arg` by Jarcho · Pull Request #8271 · rust-lang/rust-clippy...
source link: https://github.com/rust-lang/rust-clippy/pull/8271
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
fixes #214
fixes #1981
fixes #3381
fixes #6406
fixes #6964
This does not take into account the return type of the function currently, so (&Vec<_>) -> &Vec<_>
functions may still be false positives.
The name given for the type also has to match the real type name, so type Foo = Vec<u32>
won't trigger the lint, but type Vec = Vec<u32>
will. I'm not sure if this is the best way to handle this, or if a note about the actual type should be added instead.
changelog: Check if the argument is used in a way which requires the original type in ptr_arg
changelog: Lint mutable references in ptr_arg
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK