]> git.lizzy.rs Git - rust.git/blob - tests/ui/map_clone.stderr
remove all //~ from tests
[rust.git] / tests / ui / map_clone.stderr
1 error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
2   --> $DIR/map_clone.rs:12:5
3    |
4 12 |     x.iter().map(|y| y.clone());
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 note: lint level defined here
8   --> $DIR/map_clone.rs:4:9
9    |
10 4  | #![deny(map_clone)]
11    |         ^^^^^^^^^
12    = help: try
13            x.iter().cloned()
14
15 error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
16   --> $DIR/map_clone.rs:14:5
17    |
18 14 |     x.iter().map(|&y| y);
19    |     ^^^^^^^^^^^^^^^^^^^^
20    |
21    = help: try
22            x.iter().cloned()
23
24 error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
25   --> $DIR/map_clone.rs:16:5
26    |
27 16 |     x.iter().map(|y| *y);
28    |     ^^^^^^^^^^^^^^^^^^^^
29    |
30    = help: try
31            x.iter().cloned()
32
33 error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
34   --> $DIR/map_clone.rs:18:5
35    |
36 18 |     x.iter().map(|y| { y.clone() });
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38    |
39    = help: try
40            x.iter().cloned()
41
42 error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
43   --> $DIR/map_clone.rs:20:5
44    |
45 20 |     x.iter().map(|&y| { y });
46    |     ^^^^^^^^^^^^^^^^^^^^^^^^
47    |
48    = help: try
49            x.iter().cloned()
50
51 error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
52   --> $DIR/map_clone.rs:22:5
53    |
54 22 |     x.iter().map(|y| { *y });
55    |     ^^^^^^^^^^^^^^^^^^^^^^^^
56    |
57    = help: try
58            x.iter().cloned()
59
60 error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()`
61   --> $DIR/map_clone.rs:24:5
62    |
63 24 |     x.iter().map(Clone::clone);
64    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
65    |
66    = help: try
67            x.iter().cloned()
68
69 error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()`
70   --> $DIR/map_clone.rs:30:5
71    |
72 30 |     x.as_ref().map(|y| y.clone());
73    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74    |
75    = help: try
76            x.as_ref().cloned()
77
78 error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()`
79   --> $DIR/map_clone.rs:32:5
80    |
81 32 |     x.as_ref().map(|&y| y);
82    |     ^^^^^^^^^^^^^^^^^^^^^^
83    |
84    = help: try
85            x.as_ref().cloned()
86
87 error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()`
88   --> $DIR/map_clone.rs:34:5
89    |
90 34 |     x.as_ref().map(|y| *y);
91    |     ^^^^^^^^^^^^^^^^^^^^^^
92    |
93    = help: try
94            x.as_ref().cloned()
95
96 error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()`
97   --> $DIR/map_clone.rs:90:35
98    |
99 90 |     let _: Option<UnusualDeref> = x.as_ref().map(|y| *y);
100    |                                   ^^^^^^^^^^^^^^^^^^^^^^
101    |
102    = help: try
103            x.as_ref().cloned()
104
105 error: aborting due to 11 previous errors
106