]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/clone_on_copy.stderr
Merge commit '2ca58e7dda4a9eb142599638c59dc04d15961175' into clippyup
[rust.git] / src / tools / clippy / tests / ui / clone_on_copy.stderr
1 error: using `clone` on a `Copy` type
2   --> $DIR/clone_on_copy.rs:22:5
3    |
4 LL |     42.clone();
5    |     ^^^^^^^^^^ help: try removing the `clone` call: `42`
6    |
7    = note: `-D clippy::clone-on-copy` implied by `-D warnings`
8
9 error: using `clone` on a `Copy` type
10   --> $DIR/clone_on_copy.rs:26:5
11    |
12 LL |     (&42).clone();
13    |     ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)`
14
15 error: using `clone` on a `Copy` type
16   --> $DIR/clone_on_copy.rs:29:5
17    |
18 LL |     rc.borrow().clone();
19    |     ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()`
20
21 error: using `clone` on a `Copy` type
22   --> $DIR/clone_on_copy.rs:35:14
23    |
24 LL |     is_ascii('z'.clone());
25    |              ^^^^^^^^^^^ help: try removing the `clone` call: `'z'`
26
27 error: using `clone` on a `Copy` type
28   --> $DIR/clone_on_copy.rs:39:14
29    |
30 LL |     vec.push(42.clone());
31    |              ^^^^^^^^^^ help: try removing the `clone` call: `42`
32
33 error: aborting due to 5 previous errors
34