wrong_self_convention possibly too strict for Copy types #6727
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
Lint name: wrong_self_convention
I tried this code:
I get this:
If this trait is implemented for types such as
f32
, then i think theto_
prefix makes complete sense -f32
already has methods with that prefix and it makes no sense to take such a small type by reference.I think this lint should allow
to_
on Copy types to takeself
without reference.Meta
cargo clippy -V
: clippy 0.1.52 (e9920ef 2021-02-11)rustc -Vv
:The text was updated successfully, but these errors were encountered: