diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/wrong_self_conventions_mut.stderr')
-rw-r--r-- | src/tools/clippy/tests/ui/wrong_self_conventions_mut.stderr | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/wrong_self_conventions_mut.stderr b/src/tools/clippy/tests/ui/wrong_self_conventions_mut.stderr new file mode 100644 index 000000000..8665d8dc9 --- /dev/null +++ b/src/tools/clippy/tests/ui/wrong_self_conventions_mut.stderr @@ -0,0 +1,19 @@ +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]> { + | ^^^^^^^^^ + | + = note: `-D clippy::wrong-self-convention` implied by `-D warnings` + = help: consider choosing a less ambiguous name + +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 + |