1error: using `clone` on type `i32` which implements the `Copy` trait 2 --> $DIR/clone_on_copy.rs:24:5 3 | 4LL | 42.clone(); 5 | ^^^^^^^^^^ help: try removing the `clone` call: `42` 6 | 7 = note: `-D clippy::clone-on-copy` implied by `-D warnings` 8 9error: using `clone` on type `i32` which implements the `Copy` trait 10 --> $DIR/clone_on_copy.rs:28:5 11 | 12LL | (&42).clone(); 13 | ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)` 14 15error: using `clone` on type `i32` which implements the `Copy` trait 16 --> $DIR/clone_on_copy.rs:31:5 17 | 18LL | rc.borrow().clone(); 19 | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()` 20 21error: using `clone` on type `u32` which implements the `Copy` trait 22 --> $DIR/clone_on_copy.rs:34:5 23 | 24LL | x.clone().rotate_left(1); 25 | ^^^^^^^^^ help: try removing the `clone` call: `x` 26 27error: using `clone` on type `i32` which implements the `Copy` trait 28 --> $DIR/clone_on_copy.rs:48:5 29 | 30LL | m!(42).clone(); 31 | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m!(42)` 32 33error: using `clone` on type `[u32; 2]` which implements the `Copy` trait 34 --> $DIR/clone_on_copy.rs:58:5 35 | 36LL | x.clone()[0]; 37 | ^^^^^^^^^ help: try dereferencing it: `(*x)` 38 39error: using `clone` on type `char` which implements the `Copy` trait 40 --> $DIR/clone_on_copy.rs:68:14 41 | 42LL | is_ascii('z'.clone()); 43 | ^^^^^^^^^^^ help: try removing the `clone` call: `'z'` 44 45error: using `clone` on type `i32` which implements the `Copy` trait 46 --> $DIR/clone_on_copy.rs:72:14 47 | 48LL | vec.push(42.clone()); 49 | ^^^^^^^^^^ help: try removing the `clone` call: `42` 50 51error: aborting due to 8 previous errors 52 53