2020-12-20 16:19:49 +00:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:23:5
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
|
LL | 42.clone();
|
|
|
|
| ^^^^^^^^^^ help: try removing the `clone` call: `42`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::clone-on-copy` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`
|
2020-07-14 12:59:59 +00:00
|
|
|
|
2020-12-20 16:19:49 +00:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:27:5
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:30:5
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
|
LL | rc.borrow().clone();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()`
|
|
|
|
|
2021-04-08 15:50:13 +00:00
|
|
|
error: using `clone` on type `u32` which implements the `Copy` trait
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:33:5
|
2021-04-08 15:50:13 +00:00
|
|
|
|
|
|
|
|
LL | x.clone().rotate_left(1);
|
|
|
|
| ^^^^^^^^^ help: try removing the `clone` call: `x`
|
|
|
|
|
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:47:5
|
2021-04-08 15:50:13 +00:00
|
|
|
|
|
|
|
|
LL | m!(42).clone();
|
|
|
|
| ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m!(42)`
|
|
|
|
|
|
|
|
error: using `clone` on type `[u32; 2]` which implements the `Copy` trait
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:57:5
|
2021-04-08 15:50:13 +00:00
|
|
|
|
|
|
|
|
LL | x.clone()[0];
|
|
|
|
| ^^^^^^^^^ help: try dereferencing it: `(*x)`
|
|
|
|
|
2020-12-20 16:19:49 +00:00
|
|
|
error: using `clone` on type `char` which implements the `Copy` trait
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:67:14
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:71:14
|
2020-07-14 12:59:59 +00:00
|
|
|
|
|
|
|
|
LL | vec.push(42.clone());
|
|
|
|
| ^^^^^^^^^^ help: try removing the `clone` call: `42`
|
|
|
|
|
2023-01-12 18:48:13 +00:00
|
|
|
error: using `clone` on type `Option<i32>` which implements the `Copy` trait
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/clone_on_copy.rs:75:17
|
2022-08-11 17:42:16 +00:00
|
|
|
|
|
|
|
|
LL | let value = opt.clone()?; // operator precedence needed (*opt)?
|
|
|
|
| ^^^^^^^^^^^ help: try dereferencing it: `(*opt)`
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2020-07-14 12:59:59 +00:00
|
|
|
|