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