11error: using `clone` on type `i32` which implements the `Copy` trait
2- --> tests/ui/clone_on_copy.rs:23 :5
2+ --> tests/ui/clone_on_copy.rs:14 :5
33 |
44LL | 42.clone();
55 | ^^^^^^^^^^ help: try removing the `clone` call: `42`
@@ -8,52 +8,58 @@ LL | 42.clone();
88 = help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`
99
1010error: using `clone` on type `i32` which implements the `Copy` trait
11- --> tests/ui/clone_on_copy.rs:28 :5
11+ --> tests/ui/clone_on_copy.rs:19 :5
1212 |
1313LL | (&42).clone();
1414 | ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)`
1515
1616error: using `clone` on type `i32` which implements the `Copy` trait
17- --> tests/ui/clone_on_copy.rs:32 :5
17+ --> tests/ui/clone_on_copy.rs:23 :5
1818 |
1919LL | rc.borrow().clone();
2020 | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()`
2121
2222error: using `clone` on type `u32` which implements the `Copy` trait
23- --> tests/ui/clone_on_copy.rs:36 :5
23+ --> tests/ui/clone_on_copy.rs:27 :5
2424 |
2525LL | x.clone().rotate_left(1);
2626 | ^^^^^^^^^ help: try removing the `clone` call: `x`
2727
2828error: using `clone` on type `i32` which implements the `Copy` trait
29- --> tests/ui/clone_on_copy.rs:51 :5
29+ --> tests/ui/clone_on_copy.rs:42 :5
3030 |
3131LL | m!(42).clone();
3232 | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m!(42)`
3333
3434error: using `clone` on type `[u32; 2]` which implements the `Copy` trait
35- --> tests/ui/clone_on_copy.rs:62 :5
35+ --> tests/ui/clone_on_copy.rs:53 :5
3636 |
3737LL | x.clone()[0];
3838 | ^^^^^^^^^ help: try dereferencing it: `(*x)`
3939
40+ error: using `clone` on type `E` which implements the `Copy` trait
41+ --> tests/ui/clone_on_copy.rs:92:20
42+ |
43+ LL | let _: E = a.clone();
44+ | ^^^^^^^^^ help: try dereferencing it: `*****a`
45+
4046error: using `clone` on type `char` which implements the `Copy` trait
41- --> tests/ui/clone_on_copy.rs:73 :14
47+ --> tests/ui/clone_on_copy.rs:107 :14
4248 |
4349LL | is_ascii('z'.clone());
4450 | ^^^^^^^^^^^ help: try removing the `clone` call: `'z'`
4551
4652error: using `clone` on type `i32` which implements the `Copy` trait
47- --> tests/ui/clone_on_copy.rs:78 :14
53+ --> tests/ui/clone_on_copy.rs:114 :14
4854 |
4955LL | vec.push(42.clone());
5056 | ^^^^^^^^^^ help: try removing the `clone` call: `42`
5157
5258error: using `clone` on type `Option<i32>` which implements the `Copy` trait
53- --> tests/ui/clone_on_copy.rs:83 :17
59+ --> tests/ui/clone_on_copy.rs:120 :17
5460 |
5561LL | let value = opt.clone()?; // operator precedence needed (*opt)?
5662 | ^^^^^^^^^^^ help: try dereferencing it: `(*opt)`
5763
58- error: aborting due to 9 previous errors
64+ error: aborting due to 10 previous errors
5965
0 commit comments