1 error: using `clone` on a `Copy` type
2 --> $DIR/unnecessary_clone.rs:11:5
5 | ^^^^^^^^^^ help: try removing the `clone` call: `42`
7 = note: `-D clone-on-copy` implied by `-D warnings`
9 error: using `clone` on a `Copy` type
10 --> $DIR/unnecessary_clone.rs:15:5
13 | ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)`
15 error: using '.clone()' on a ref-counted pointer
16 --> $DIR/unnecessary_clone.rs:25:5
19 | ^^^^^^^^^^ help: try this: `Rc::clone(&rc)`
21 = note: `-D clone-on-ref-ptr` implied by `-D warnings`
23 error: using '.clone()' on a ref-counted pointer
24 --> $DIR/unnecessary_clone.rs:28:5
27 | ^^^^^^^^^^^ help: try this: `Arc::clone(&arc)`
29 error: using '.clone()' on a ref-counted pointer
30 --> $DIR/unnecessary_clone.rs:31:5
33 | ^^^^^^^^^^^^^^ help: try this: `Weak::clone(&rcweak)`
35 error: using '.clone()' on a ref-counted pointer
36 --> $DIR/unnecessary_clone.rs:34:5
38 34 | arc_weak.clone();
39 | ^^^^^^^^^^^^^^^^ help: try this: `Weak::clone(&arc_weak)`
41 error: using `clone` on a `Copy` type
42 --> $DIR/unnecessary_clone.rs:41:5
45 | ^^^^^^^^^ help: try removing the `clone` call: `t`
47 error: using `clone` on a `Copy` type
48 --> $DIR/unnecessary_clone.rs:43:5
51 | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `Some(t)`
53 error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type
54 --> $DIR/unnecessary_clone.rs:49:22
56 49 | let z: &Vec<_> = y.clone();
57 | ^^^^^^^^^ help: try dereferencing it: `(*y).clone()`
59 = note: `-D clone-double-ref` implied by `-D warnings`
61 error: called `cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
62 --> $DIR/unnecessary_clone.rs:56:27
64 56 | let v2 : Vec<isize> = v.iter().cloned().collect();
65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
67 = note: `-D iter-cloned-collect` implied by `-D warnings`