1 error: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type
2 --> $DIR/implicit_clone.rs:65:13
4 LL | let _ = vec.to_owned();
5 | ^^^^^^^^^^^^^^ help: consider using: `vec.clone()`
7 = note: `-D clippy::implicit-clone` implied by `-D warnings`
8 = help: to override `-D warnings` add `#[allow(clippy::implicit_clone)]`
10 error: implicitly cloning a `Vec` by calling `to_vec` on its dereferenced type
11 --> $DIR/implicit_clone.rs:66:13
13 LL | let _ = vec.to_vec();
14 | ^^^^^^^^^^^^ help: consider using: `vec.clone()`
16 error: implicitly cloning a `Vec` by calling `to_vec` on its dereferenced type
17 --> $DIR/implicit_clone.rs:71:13
19 LL | let _ = vec_ref.to_vec();
20 | ^^^^^^^^^^^^^^^^ help: consider using: `vec_ref.clone()`
22 error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type
23 --> $DIR/implicit_clone.rs:83:13
25 LL | let _ = str.to_owned();
26 | ^^^^^^^^^^^^^^ help: consider using: `str.clone()`
28 error: implicitly cloning a `Kitten` by calling `to_owned` on its dereferenced type
29 --> $DIR/implicit_clone.rs:87:13
31 LL | let _ = kitten.to_owned();
32 | ^^^^^^^^^^^^^^^^^ help: consider using: `kitten.clone()`
34 error: implicitly cloning a `PathBuf` by calling `to_owned` on its dereferenced type
35 --> $DIR/implicit_clone.rs:97:13
37 LL | let _ = pathbuf.to_owned();
38 | ^^^^^^^^^^^^^^^^^^ help: consider using: `pathbuf.clone()`
40 error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
41 --> $DIR/implicit_clone.rs:98:13
43 LL | let _ = pathbuf.to_path_buf();
44 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `pathbuf.clone()`
46 error: implicitly cloning a `OsString` by calling `to_owned` on its dereferenced type
47 --> $DIR/implicit_clone.rs:101:13
49 LL | let _ = os_string.to_owned();
50 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `os_string.clone()`
52 error: implicitly cloning a `OsString` by calling `to_os_string` on its dereferenced type
53 --> $DIR/implicit_clone.rs:102:13
55 LL | let _ = os_string.to_os_string();
56 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `os_string.clone()`
58 error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
59 --> $DIR/implicit_clone.rs:113:13
61 LL | let _ = pathbuf_ref.to_path_buf();
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(*pathbuf_ref).clone()`
64 error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
65 --> $DIR/implicit_clone.rs:116:13
67 LL | let _ = pathbuf_ref.to_path_buf();
68 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(**pathbuf_ref).clone()`
70 error: aborting due to 11 previous errors