mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 00:56:14 +00:00
20 lines
761 B
Plaintext
20 lines
761 B
Plaintext
error: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
|
|
--> $DIR/wrong_self_conventions_mut.rs:14:24
|
|
|
|
|
LL | pub fn to_many(&mut self) -> Option<&mut [T]> {
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider choosing a less ambiguous name
|
|
= note: `-D clippy::wrong-self-convention` implied by `-D warnings`
|
|
|
|
error: methods with the following characteristics: (`to_*` and `*_mut`) usually take `self` by mutable reference
|
|
--> $DIR/wrong_self_conventions_mut.rs:22:28
|
|
|
|
|
LL | pub fn to_many_mut(&self) -> Option<&[T]> {
|
|
| ^^^^^
|
|
|
|
|
= help: consider choosing a less ambiguous name
|
|
|
|
error: aborting due to 2 previous errors
|
|
|