|
1 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `Vec` |
| 1 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` |
2 | 2 | --> $DIR/into_iter_on_ref.rs:14:30 |
3 | 3 | | |
4 | 4 | LL | let _ = (&vec![1, 2, 3]).into_iter(); //~ WARN equivalent to .iter() |
5 | 5 | | ^^^^^^^^^ help: call directly: `iter` |
6 | 6 | | |
7 | 7 | = note: `-D clippy::into-iter-on-ref` implied by `-D warnings` |
8 | 8 |
|
9 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `slice` |
| 9 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` |
10 | 10 | --> $DIR/into_iter_on_ref.rs:15:46 |
11 | 11 | | |
12 | 12 | LL | let _ = vec![1, 2, 3].into_boxed_slice().into_iter(); //~ WARN equivalent to .iter() |
13 | 13 | | ^^^^^^^^^ help: call directly: `iter` |
14 | 14 |
|
15 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `slice` |
| 15 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` |
16 | 16 | --> $DIR/into_iter_on_ref.rs:16:41 |
17 | 17 | | |
18 | 18 | LL | let _ = std::rc::Rc::from(&[X][..]).into_iter(); //~ WARN equivalent to .iter() |
19 | 19 | | ^^^^^^^^^ help: call directly: `iter` |
20 | 20 |
|
21 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `slice` |
| 21 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` |
22 | 22 | --> $DIR/into_iter_on_ref.rs:17:44 |
23 | 23 | | |
24 | 24 | LL | let _ = std::sync::Arc::from(&[X][..]).into_iter(); //~ WARN equivalent to .iter() |
25 | 25 | | ^^^^^^^^^ help: call directly: `iter` |
26 | 26 |
|
27 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `array` |
| 27 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array` |
28 | 28 | --> $DIR/into_iter_on_ref.rs:19:32 |
29 | 29 | | |
30 | 30 | LL | let _ = (&&&&&&&[1, 2, 3]).into_iter(); //~ ERROR equivalent to .iter() |
31 | 31 | | ^^^^^^^^^ help: call directly: `iter` |
32 | 32 |
|
33 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `array` |
| 33 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array` |
34 | 34 | --> $DIR/into_iter_on_ref.rs:20:36 |
35 | 35 | | |
36 | 36 | LL | let _ = (&&&&mut &&&[1, 2, 3]).into_iter(); //~ ERROR equivalent to .iter() |
37 | 37 | | ^^^^^^^^^ help: call directly: `iter` |
38 | 38 |
|
39 | | -error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not move the `array` |
| 39 | +error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `array` |
40 | 40 | --> $DIR/into_iter_on_ref.rs:21:40 |
41 | 41 | | |
42 | 42 | LL | let _ = (&mut &mut &mut [1, 2, 3]).into_iter(); //~ ERROR equivalent to .iter_mut() |
43 | 43 | | ^^^^^^^^^ help: call directly: `iter_mut` |
44 | 44 |
|
45 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `Option` |
| 45 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Option` |
46 | 46 | --> $DIR/into_iter_on_ref.rs:23:24 |
47 | 47 | | |
48 | 48 | LL | let _ = (&Some(4)).into_iter(); //~ WARN equivalent to .iter() |
49 | 49 | | ^^^^^^^^^ help: call directly: `iter` |
50 | 50 |
|
51 | | -error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not move the `Option` |
| 51 | +error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Option` |
52 | 52 | --> $DIR/into_iter_on_ref.rs:24:28 |
53 | 53 | | |
54 | 54 | LL | let _ = (&mut Some(5)).into_iter(); //~ WARN equivalent to .iter_mut() |
55 | 55 | | ^^^^^^^^^ help: call directly: `iter_mut` |
56 | 56 |
|
57 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `Result` |
| 57 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Result` |
58 | 58 | --> $DIR/into_iter_on_ref.rs:25:32 |
59 | 59 | | |
60 | 60 | LL | let _ = (&Ok::<_, i32>(6)).into_iter(); //~ WARN equivalent to .iter() |
61 | 61 | | ^^^^^^^^^ help: call directly: `iter` |
62 | 62 |
|
63 | | -error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not move the `Result` |
| 63 | +error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Result` |
64 | 64 | --> $DIR/into_iter_on_ref.rs:26:37 |
65 | 65 | | |
66 | 66 | LL | let _ = (&mut Err::<i32, _>(7)).into_iter(); //~ WARN equivalent to .iter_mut() |
67 | 67 | | ^^^^^^^^^ help: call directly: `iter_mut` |
68 | 68 |
|
69 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `Vec` |
| 69 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` |
70 | 70 | --> $DIR/into_iter_on_ref.rs:27:34 |
71 | 71 | | |
72 | 72 | LL | let _ = (&Vec::<i32>::new()).into_iter(); //~ WARN equivalent to .iter() |
73 | 73 | | ^^^^^^^^^ help: call directly: `iter` |
74 | 74 |
|
75 | | -error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not move the `Vec` |
| 75 | +error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Vec` |
76 | 76 | --> $DIR/into_iter_on_ref.rs:28:38 |
77 | 77 | | |
78 | 78 | LL | let _ = (&mut Vec::<i32>::new()).into_iter(); //~ WARN equivalent to .iter_mut() |
79 | 79 | | ^^^^^^^^^ help: call directly: `iter_mut` |
80 | 80 |
|
81 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `BTreeMap` |
| 81 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeMap` |
82 | 82 | --> $DIR/into_iter_on_ref.rs:29:44 |
83 | 83 | | |
84 | 84 | LL | let _ = (&BTreeMap::<i32, u64>::new()).into_iter(); //~ WARN equivalent to .iter() |
85 | 85 | | ^^^^^^^^^ help: call directly: `iter` |
86 | 86 |
|
87 | | -error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not move the `BTreeMap` |
| 87 | +error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `BTreeMap` |
88 | 88 | --> $DIR/into_iter_on_ref.rs:30:48 |
89 | 89 | | |
90 | 90 | LL | let _ = (&mut BTreeMap::<i32, u64>::new()).into_iter(); //~ WARN equivalent to .iter_mut() |
91 | 91 | | ^^^^^^^^^ help: call directly: `iter_mut` |
92 | 92 |
|
93 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `VecDeque` |
| 93 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque` |
94 | 94 | --> $DIR/into_iter_on_ref.rs:31:39 |
95 | 95 | | |
96 | 96 | LL | let _ = (&VecDeque::<i32>::new()).into_iter(); //~ WARN equivalent to .iter() |
97 | 97 | | ^^^^^^^^^ help: call directly: `iter` |
98 | 98 |
|
99 | | -error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not move the `VecDeque` |
| 99 | +error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `VecDeque` |
100 | 100 | --> $DIR/into_iter_on_ref.rs:32:43 |
101 | 101 | | |
102 | 102 | LL | let _ = (&mut VecDeque::<i32>::new()).into_iter(); //~ WARN equivalent to .iter_mut() |
103 | 103 | | ^^^^^^^^^ help: call directly: `iter_mut` |
104 | 104 |
|
105 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `LinkedList` |
| 105 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `LinkedList` |
106 | 106 | --> $DIR/into_iter_on_ref.rs:33:41 |
107 | 107 | | |
108 | 108 | LL | let _ = (&LinkedList::<i32>::new()).into_iter(); //~ WARN equivalent to .iter() |
109 | 109 | | ^^^^^^^^^ help: call directly: `iter` |
110 | 110 |
|
111 | | -error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not move the `LinkedList` |
| 111 | +error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `LinkedList` |
112 | 112 | --> $DIR/into_iter_on_ref.rs:34:45 |
113 | 113 | | |
114 | 114 | LL | let _ = (&mut LinkedList::<i32>::new()).into_iter(); //~ WARN equivalent to .iter_mut() |
115 | 115 | | ^^^^^^^^^ help: call directly: `iter_mut` |
116 | 116 |
|
117 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `HashMap` |
| 117 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` |
118 | 118 | --> $DIR/into_iter_on_ref.rs:35:43 |
119 | 119 | | |
120 | 120 | LL | let _ = (&HashMap::<i32, u64>::new()).into_iter(); //~ WARN equivalent to .iter() |
121 | 121 | | ^^^^^^^^^ help: call directly: `iter` |
122 | 122 |
|
123 | | -error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not move the `HashMap` |
| 123 | +error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `HashMap` |
124 | 124 | --> $DIR/into_iter_on_ref.rs:36:47 |
125 | 125 | | |
126 | 126 | LL | let _ = (&mut HashMap::<i32, u64>::new()).into_iter(); //~ WARN equivalent to .iter_mut() |
127 | 127 | | ^^^^^^^^^ help: call directly: `iter_mut` |
128 | 128 |
|
129 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `BTreeSet` |
| 129 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeSet` |
130 | 130 | --> $DIR/into_iter_on_ref.rs:38:39 |
131 | 131 | | |
132 | 132 | LL | let _ = (&BTreeSet::<i32>::new()).into_iter(); //~ WARN equivalent to .iter() |
133 | 133 | | ^^^^^^^^^ help: call directly: `iter` |
134 | 134 |
|
135 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `BinaryHeap` |
| 135 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BinaryHeap` |
136 | 136 | --> $DIR/into_iter_on_ref.rs:39:41 |
137 | 137 | | |
138 | 138 | LL | let _ = (&BinaryHeap::<i32>::new()).into_iter(); //~ WARN equivalent to .iter() |
139 | 139 | | ^^^^^^^^^ help: call directly: `iter` |
140 | 140 |
|
141 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `HashSet` |
| 141 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashSet` |
142 | 142 | --> $DIR/into_iter_on_ref.rs:40:38 |
143 | 143 | | |
144 | 144 | LL | let _ = (&HashSet::<i32>::new()).into_iter(); //~ WARN equivalent to .iter() |
145 | 145 | | ^^^^^^^^^ help: call directly: `iter` |
146 | 146 |
|
147 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `Path` |
| 147 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Path` |
148 | 148 | --> $DIR/into_iter_on_ref.rs:41:43 |
149 | 149 | | |
150 | 150 | LL | let _ = std::path::Path::new("12/34").into_iter(); //~ WARN equivalent to .iter() |
151 | 151 | | ^^^^^^^^^ help: call directly: `iter` |
152 | 152 |
|
153 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `PathBuf` |
| 153 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `PathBuf` |
154 | 154 | --> $DIR/into_iter_on_ref.rs:42:47 |
155 | 155 | | |
156 | 156 | LL | let _ = std::path::PathBuf::from("12/34").into_iter(); //~ ERROR equivalent to .iter() |
157 | 157 | | ^^^^^^^^^ help: call directly: `iter` |
158 | 158 |
|
159 | | -error: this `.into_iter()` call is equivalent to `.iter()` and will not move the `array` |
| 159 | +error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array` |
160 | 160 | --> $DIR/into_iter_on_ref.rs:44:26 |
161 | 161 | | |
162 | 162 | LL | let _ = (&[1, 2, 3]).into_iter().next(); //~ WARN equivalent to .iter() |
|
0 commit comments