]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/unnecessary_iter_cloned.stderr
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / tools / clippy / tests / ui / unnecessary_iter_cloned.stderr
1 error: unnecessary use of `copied`
2   --> $DIR/unnecessary_iter_cloned.rs:31:22
3    |
4 LL |     for (t, path) in files.iter().copied() {
5    |                      ^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
8 help: use
9    |
10 LL |     for (t, path) in files {
11    |                      ~~~~~
12 help: remove this `&`
13    |
14 LL -         let other = match get_file_path(&t) {
15 LL +         let other = match get_file_path(t) {
16    |
17
18 error: unnecessary use of `copied`
19   --> $DIR/unnecessary_iter_cloned.rs:46:22
20    |
21 LL |     for (t, path) in files.iter().copied() {
22    |                      ^^^^^^^^^^^^^^^^^^^^^
23    |
24 help: use
25    |
26 LL |     for (t, path) in files.iter() {
27    |                      ~~~~~~~~~~~~
28 help: remove this `&`
29    |
30 LL -         let other = match get_file_path(&t) {
31 LL +         let other = match get_file_path(t) {
32    |
33
34 error: aborting due to 2 previous errors
35