2020-12-20 16:19:49 +00:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2020-07-14 12:59:59 +00:00
|
|
|
--> $DIR/clone_on_copy.rs:22:5
|
|
|
|
|
|
|
|
|
LL | 42.clone();
|
|
|
|
| ^^^^^^^^^^ help: try removing the `clone` call: `42`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::clone-on-copy` implied by `-D warnings`
|
|
|
|
|
2020-12-20 16:19:49 +00:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2020-07-14 12:59:59 +00:00
|
|
|
--> $DIR/clone_on_copy.rs:26:5
|
|
|
|
|
|
|
|
|
LL | (&42).clone();
|
|
|
|
| ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)`
|
|
|
|
|
2020-12-20 16:19:49 +00:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2020-07-14 12:59:59 +00:00
|
|
|
--> $DIR/clone_on_copy.rs:29:5
|
|
|
|
|
|
|
|
|
LL | rc.borrow().clone();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()`
|
|
|
|
|
2020-12-20 16:19:49 +00:00
|
|
|
error: using `clone` on type `char` which implements the `Copy` trait
|
2020-07-14 12:59:59 +00:00
|
|
|
--> $DIR/clone_on_copy.rs:35:14
|
|
|
|
|
|
|
|
|
LL | is_ascii('z'.clone());
|
|
|
|
| ^^^^^^^^^^^ help: try removing the `clone` call: `'z'`
|
|
|
|
|
2020-12-20 16:19:49 +00:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2020-07-14 12:59:59 +00:00
|
|
|
--> $DIR/clone_on_copy.rs:39:14
|
|
|
|
|
|
|
|
|
LL | vec.push(42.clone());
|
|
|
|
| ^^^^^^^^^^ help: try removing the `clone` call: `42`
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|