summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unnecessary_iter_cloned.stderr
blob: ba40c6c14db214281e50eb8e51ff4147b50bec0a (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
error: unnecessary use of `copied`
  --> $DIR/unnecessary_iter_cloned.rs:29:22
   |
LL |     for (t, path) in files.iter().copied() {
   |                      ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_to_owned)]`
help: use
   |
LL |     for (t, path) in files {
   |                      ~~~~~
help: remove this `&`
   |
LL -         let other = match get_file_path(&t) {
LL +         let other = match get_file_path(t) {
   |

error: unnecessary use of `copied`
  --> $DIR/unnecessary_iter_cloned.rs:44:22
   |
LL |     for (t, path) in files.iter().copied() {
   |                      ^^^^^^^^^^^^^^^^^^^^^
   |
help: use
   |
LL |     for (t, path) in files.iter() {
   |                      ~~~~~~~~~~~~
help: remove this `&`
   |
LL -         let other = match get_file_path(&t) {
LL +         let other = match get_file_path(t) {
   |

error: aborting due to 2 previous errors