]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_clone.stderr
Merge pull request #3336 from HMPerson1/clone_on_copy_deref
[rust.git] / tests / ui / redundant_clone.stderr
1 error: redundant clone
2   --> $DIR/redundant_clone.rs:16:41
3    |
4 16 |     let _ = ["lorem", "ipsum"].join(" ").to_string();
5    |                                         ^^^^^^^^^^^^ help: remove this
6    |
7    = note: `-D clippy::redundant-clone` implied by `-D warnings`
8 note: this value is dropped without further use
9   --> $DIR/redundant_clone.rs:16:13
10    |
11 16 |     let _ = ["lorem", "ipsum"].join(" ").to_string();
12    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
14 error: redundant clone
15   --> $DIR/redundant_clone.rs:19:14
16    |
17 19 |     let _ = s.clone();
18    |              ^^^^^^^^ help: remove this
19    |
20 note: this value is dropped without further use
21   --> $DIR/redundant_clone.rs:19:13
22    |
23 19 |     let _ = s.clone();
24    |             ^
25
26 error: redundant clone
27   --> $DIR/redundant_clone.rs:22:14
28    |
29 22 |     let _ = s.to_string();
30    |              ^^^^^^^^^^^^ help: remove this
31    |
32 note: this value is dropped without further use
33   --> $DIR/redundant_clone.rs:22:13
34    |
35 22 |     let _ = s.to_string();
36    |             ^
37
38 error: redundant clone
39   --> $DIR/redundant_clone.rs:25:14
40    |
41 25 |     let _ = s.to_owned();
42    |              ^^^^^^^^^^^ help: remove this
43    |
44 note: this value is dropped without further use
45   --> $DIR/redundant_clone.rs:25:13
46    |
47 25 |     let _ = s.to_owned();
48    |             ^
49
50 error: redundant clone
51   --> $DIR/redundant_clone.rs:27:41
52    |
53 27 |     let _ = Path::new("/a/b/").join("c").to_owned();
54    |                                         ^^^^^^^^^^^ help: remove this
55    |
56 note: this value is dropped without further use
57   --> $DIR/redundant_clone.rs:27:13
58    |
59 27 |     let _ = Path::new("/a/b/").join("c").to_owned();
60    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
62 error: redundant clone
63   --> $DIR/redundant_clone.rs:29:41
64    |
65 29 |     let _ = Path::new("/a/b/").join("c").to_path_buf();
66    |                                         ^^^^^^^^^^^^^^ help: remove this
67    |
68 note: this value is dropped without further use
69   --> $DIR/redundant_clone.rs:29:13
70    |
71 29 |     let _ = Path::new("/a/b/").join("c").to_path_buf();
72    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
74 error: redundant clone
75   --> $DIR/redundant_clone.rs:31:28
76    |
77 31 |     let _ = OsString::new().to_owned();
78    |                            ^^^^^^^^^^^ help: remove this
79    |
80 note: this value is dropped without further use
81   --> $DIR/redundant_clone.rs:31:13
82    |
83 31 |     let _ = OsString::new().to_owned();
84    |             ^^^^^^^^^^^^^^^
85
86 error: redundant clone
87   --> $DIR/redundant_clone.rs:33:28
88    |
89 33 |     let _ = OsString::new().to_os_string();
90    |                            ^^^^^^^^^^^^^^^ help: remove this
91    |
92 note: this value is dropped without further use
93   --> $DIR/redundant_clone.rs:33:13
94    |
95 33 |     let _ = OsString::new().to_os_string();
96    |             ^^^^^^^^^^^^^^^
97
98 error: redundant clone
99   --> $DIR/redundant_clone.rs:43:22
100    |
101 43 |         (a.clone(), a.clone())
102    |                      ^^^^^^^^ help: remove this
103    |
104 note: this value is dropped without further use
105   --> $DIR/redundant_clone.rs:43:21
106    |
107 43 |         (a.clone(), a.clone())
108    |                     ^
109
110 error: aborting due to 9 previous errors
111