]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/map_clone.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / map_clone.stderr
CommitLineData
ea8adc8c
XL
1error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
2 --> $DIR/map_clone.rs:12:5
3 |
412 | x.iter().map(|y| y.clone());
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `-D map-clone` implied by `-D warnings`
8 = help: try
9 x.iter().cloned()
10
11error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
12 --> $DIR/map_clone.rs:14:5
13 |
1414 | x.iter().map(|&y| y);
15 | ^^^^^^^^^^^^^^^^^^^^
16 |
17 = help: try
18 x.iter().cloned()
19
20error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
21 --> $DIR/map_clone.rs:16:5
22 |
2316 | x.iter().map(|y| *y);
24 | ^^^^^^^^^^^^^^^^^^^^
25 |
26 = help: try
27 x.iter().cloned()
28
29error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
30 --> $DIR/map_clone.rs:18:5
31 |
3218 | x.iter().map(|y| { y.clone() });
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 |
35 = help: try
36 x.iter().cloned()
37
38error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
39 --> $DIR/map_clone.rs:20:5
40 |
4120 | x.iter().map(|&y| { y });
42 | ^^^^^^^^^^^^^^^^^^^^^^^^
43 |
44 = help: try
45 x.iter().cloned()
46
47error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
48 --> $DIR/map_clone.rs:22:5
49 |
5022 | x.iter().map(|y| { *y });
51 | ^^^^^^^^^^^^^^^^^^^^^^^^
52 |
53 = help: try
54 x.iter().cloned()
55
56error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
57 --> $DIR/map_clone.rs:24:5
58 |
5924 | x.iter().map(Clone::clone);
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
61 |
62 = help: try
63 x.iter().cloned()
64
65error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()`
66 --> $DIR/map_clone.rs:30:5
67 |
6830 | x.as_ref().map(|y| y.clone());
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70 |
71 = help: try
72 x.as_ref().cloned()
73
74error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()`
75 --> $DIR/map_clone.rs:32:5
76 |
7732 | x.as_ref().map(|&y| y);
78 | ^^^^^^^^^^^^^^^^^^^^^^
79 |
80 = help: try
81 x.as_ref().cloned()
82
83error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()`
84 --> $DIR/map_clone.rs:34:5
85 |
8634 | x.as_ref().map(|y| *y);
87 | ^^^^^^^^^^^^^^^^^^^^^^
88 |
89 = help: try
90 x.as_ref().cloned()
91
92error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()`
93 --> $DIR/map_clone.rs:90:35
94 |
9590 | let _: Option<UnusualDeref> = x.as_ref().map(|y| *y);
96 | ^^^^^^^^^^^^^^^^^^^^^^
97 |
98 = help: try
99 x.as_ref().cloned()
100