about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/implicit_clone.stderr
blob: 4cca9b0d0c07ae270ce4a9005ddccfaa15e366a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
error: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type
  --> tests/ui/implicit_clone.rs:65:13
   |
LL |     let _ = vec.to_owned();
   |             ^^^^^^^^^^^^^^ help: consider using: `vec.clone()`
   |
   = note: `-D clippy::implicit-clone` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::implicit_clone)]`

error: implicitly cloning a `Vec` by calling `to_vec` on its dereferenced type
  --> tests/ui/implicit_clone.rs:67:13
   |
LL |     let _ = vec.to_vec();
   |             ^^^^^^^^^^^^ help: consider using: `vec.clone()`

error: implicitly cloning a `Vec` by calling `to_vec` on its dereferenced type
  --> tests/ui/implicit_clone.rs:73:13
   |
LL |     let _ = vec_ref.to_vec();
   |             ^^^^^^^^^^^^^^^^ help: consider using: `vec_ref.clone()`

error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type
  --> tests/ui/implicit_clone.rs:86:13
   |
LL |     let _ = str.to_owned();
   |             ^^^^^^^^^^^^^^ help: consider using: `str.clone()`

error: implicitly cloning a `Kitten` by calling `to_owned` on its dereferenced type
  --> tests/ui/implicit_clone.rs:91:13
   |
LL |     let _ = kitten.to_owned();
   |             ^^^^^^^^^^^^^^^^^ help: consider using: `kitten.clone()`

error: implicitly cloning a `PathBuf` by calling `to_owned` on its dereferenced type
  --> tests/ui/implicit_clone.rs:102:13
   |
LL |     let _ = pathbuf.to_owned();
   |             ^^^^^^^^^^^^^^^^^^ help: consider using: `pathbuf.clone()`

error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
  --> tests/ui/implicit_clone.rs:104:13
   |
LL |     let _ = pathbuf.to_path_buf();
   |             ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `pathbuf.clone()`

error: implicitly cloning a `OsString` by calling `to_owned` on its dereferenced type
  --> tests/ui/implicit_clone.rs:108:13
   |
LL |     let _ = os_string.to_owned();
   |             ^^^^^^^^^^^^^^^^^^^^ help: consider using: `os_string.clone()`

error: implicitly cloning a `OsString` by calling `to_os_string` on its dereferenced type
  --> tests/ui/implicit_clone.rs:110:13
   |
LL |     let _ = os_string.to_os_string();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `os_string.clone()`

error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
  --> tests/ui/implicit_clone.rs:122:13
   |
LL |     let _ = pathbuf_ref.to_path_buf();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(*pathbuf_ref).clone()`

error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
  --> tests/ui/implicit_clone.rs:126:13
   |
LL |     let _ = pathbuf_ref.to_path_buf();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(**pathbuf_ref).clone()`

error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type
  --> tests/ui/implicit_clone.rs:140:13
   |
LL |     let _ = s.to_owned();
   |             ^^^^^^^^^^^^ help: consider using: `s.clone()`

error: implicitly cloning a `String` by calling `to_string` on its dereferenced type
  --> tests/ui/implicit_clone.rs:142:13
   |
LL |     let _ = s.to_string();
   |             ^^^^^^^^^^^^^ help: consider using: `s.clone()`

error: aborting due to 13 previous errors