]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/implicit_clone.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / implicit_clone.stderr
1 error: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type
2 --> $DIR/implicit_clone.rs:65:13
3 |
4 LL | let _ = vec.to_owned();
5 | ^^^^^^^^^^^^^^ help: consider using: `vec.clone()`
6 |
7 = note: `-D clippy::implicit-clone` implied by `-D warnings`
8 = help: to override `-D warnings` add `#[allow(clippy::implicit_clone)]`
9
10 error: implicitly cloning a `Vec` by calling `to_vec` on its dereferenced type
11 --> $DIR/implicit_clone.rs:66:13
12 |
13 LL | let _ = vec.to_vec();
14 | ^^^^^^^^^^^^ help: consider using: `vec.clone()`
15
16 error: implicitly cloning a `Vec` by calling `to_vec` on its dereferenced type
17 --> $DIR/implicit_clone.rs:71:13
18 |
19 LL | let _ = vec_ref.to_vec();
20 | ^^^^^^^^^^^^^^^^ help: consider using: `vec_ref.clone()`
21
22 error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type
23 --> $DIR/implicit_clone.rs:83:13
24 |
25 LL | let _ = str.to_owned();
26 | ^^^^^^^^^^^^^^ help: consider using: `str.clone()`
27
28 error: implicitly cloning a `Kitten` by calling `to_owned` on its dereferenced type
29 --> $DIR/implicit_clone.rs:87:13
30 |
31 LL | let _ = kitten.to_owned();
32 | ^^^^^^^^^^^^^^^^^ help: consider using: `kitten.clone()`
33
34 error: implicitly cloning a `PathBuf` by calling `to_owned` on its dereferenced type
35 --> $DIR/implicit_clone.rs:97:13
36 |
37 LL | let _ = pathbuf.to_owned();
38 | ^^^^^^^^^^^^^^^^^^ help: consider using: `pathbuf.clone()`
39
40 error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
41 --> $DIR/implicit_clone.rs:98:13
42 |
43 LL | let _ = pathbuf.to_path_buf();
44 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `pathbuf.clone()`
45
46 error: implicitly cloning a `OsString` by calling `to_owned` on its dereferenced type
47 --> $DIR/implicit_clone.rs:101:13
48 |
49 LL | let _ = os_string.to_owned();
50 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `os_string.clone()`
51
52 error: implicitly cloning a `OsString` by calling `to_os_string` on its dereferenced type
53 --> $DIR/implicit_clone.rs:102:13
54 |
55 LL | let _ = os_string.to_os_string();
56 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `os_string.clone()`
57
58 error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
59 --> $DIR/implicit_clone.rs:113:13
60 |
61 LL | let _ = pathbuf_ref.to_path_buf();
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(*pathbuf_ref).clone()`
63
64 error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
65 --> $DIR/implicit_clone.rs:116:13
66 |
67 LL | let _ = pathbuf_ref.to_path_buf();
68 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(**pathbuf_ref).clone()`
69
70 error: aborting due to 11 previous errors
71