mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-17 11:05:20 +00:00
6966c78be7
When the `to_*` method takes `&self` and it is a trait implementation, we don't trigger the lint.
12 lines
404 B
Plaintext
12 lines
404 B
Plaintext
error: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
|
|
--> $DIR/wrong_self_convention2.rs:28:19
|
|
|
|
|
LL | fn to_u64(self) -> u64 {
|
|
| ^^^^
|
|
|
|
|
= note: `-D clippy::wrong-self-convention` implied by `-D warnings`
|
|
= help: consider choosing a less ambiguous name
|
|
|
|
error: aborting due to previous error
|
|
|