rust-lang / rust-clippy

A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
https://rust-lang.github.io/rust-clippy/
Other
11.28k stars 1.52k forks source link

wrong_self_convention fails for libstd RawEntryBuilderMut::from_key #3858

Open gnzlbg opened 5 years ago

gnzlbg commented 5 years ago

libstd RawEntryBuilderMut::from_key is a builder, which takes self as first argument and the key to use as a second argument. This seems ok, but wrong_self_convention lints it.

https://doc.rust-lang.org/std/collections/hash_map/struct.RawEntryBuilderMut.html#method.from_key

oli-obk commented 5 years ago

I'm not sure which part it is complaining about, if it is the fact that there are two arguments, we should not emit the lint if an argument is Self.