2021-03-25 18:29:11 +00:00
|
|
|
error: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/wrong_self_conventions_mut.rs:14:24
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | pub fn to_many(&mut self) -> Option<&mut [T]> {
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider choosing a less ambiguous name
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::wrong-self-convention` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::wrong_self_convention)]`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: methods with the following characteristics: (`to_*` and `*_mut`) usually take `self` by mutable reference
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/wrong_self_conventions_mut.rs:23:28
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | pub fn to_many_mut(&self) -> Option<&[T]> {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= help: consider choosing a less ambiguous name
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|