]>
Commit | Line | Data |
---|---|---|
f20569fa | 1 | error: using `clone` on type `i32` which implements the `Copy` trait |
781aab86 | 2 | --> $DIR/clone_on_copy.rs:23:5 |
f20569fa XL |
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` | |
781aab86 | 8 | = help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]` |
f20569fa XL |
9 | |
10 | error: using `clone` on type `i32` which implements the `Copy` trait | |
781aab86 | 11 | --> $DIR/clone_on_copy.rs:27:5 |
f20569fa XL |
12 | | |
13 | LL | (&42).clone(); | |
14 | | ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)` | |
15 | ||
16 | error: using `clone` on type `i32` which implements the `Copy` trait | |
781aab86 | 17 | --> $DIR/clone_on_copy.rs:30:5 |
f20569fa XL |
18 | | |
19 | LL | rc.borrow().clone(); | |
20 | | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()` | |
21 | ||
cdc7bbd5 | 22 | error: using `clone` on type `u32` which implements the `Copy` trait |
781aab86 | 23 | --> $DIR/clone_on_copy.rs:33:5 |
cdc7bbd5 XL |
24 | | |
25 | LL | x.clone().rotate_left(1); | |
26 | | ^^^^^^^^^ help: try removing the `clone` call: `x` | |
27 | ||
28 | error: using `clone` on type `i32` which implements the `Copy` trait | |
781aab86 | 29 | --> $DIR/clone_on_copy.rs:47:5 |
cdc7bbd5 XL |
30 | | |
31 | LL | m!(42).clone(); | |
32 | | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m!(42)` | |
33 | ||
34 | error: using `clone` on type `[u32; 2]` which implements the `Copy` trait | |
781aab86 | 35 | --> $DIR/clone_on_copy.rs:57:5 |
cdc7bbd5 XL |
36 | | |
37 | LL | x.clone()[0]; | |
38 | | ^^^^^^^^^ help: try dereferencing it: `(*x)` | |
39 | ||
f20569fa | 40 | error: using `clone` on type `char` which implements the `Copy` trait |
781aab86 | 41 | --> $DIR/clone_on_copy.rs:67:14 |
f20569fa XL |
42 | | |
43 | LL | is_ascii('z'.clone()); | |
44 | | ^^^^^^^^^^^ help: try removing the `clone` call: `'z'` | |
45 | ||
46 | error: using `clone` on type `i32` which implements the `Copy` trait | |
781aab86 | 47 | --> $DIR/clone_on_copy.rs:71:14 |
f20569fa XL |
48 | | |
49 | LL | vec.push(42.clone()); | |
50 | | ^^^^^^^^^^ help: try removing the `clone` call: `42` | |
51 | ||
9c376795 | 52 | error: using `clone` on type `Option<i32>` which implements the `Copy` trait |
781aab86 | 53 | --> $DIR/clone_on_copy.rs:75:17 |
f2b60f7d FG |
54 | | |
55 | LL | let value = opt.clone()?; // operator precedence needed (*opt)? | |
56 | | ^^^^^^^^^^^ help: try dereferencing it: `(*opt)` | |
57 | ||
58 | error: aborting due to 9 previous errors | |
f20569fa | 59 |