1 error: this .into_iter() call is equivalent to .iter() and will not move the array
2 --> $DIR/into_iter_on_ref.rs:11:22
4 11 | for _ in [1,2,3].into_iter() {} //~ ERROR equivalent to .iter()
5 | ^^^^^^^^^ help: call directly: `iter`
7 note: lint level defined here
8 --> $DIR/into_iter_on_ref.rs:2:9
10 2 | #![deny(clippy::into_iter_on_array)]
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
13 error: this .into_iter() call is equivalent to .iter() and will not move the array
14 --> $DIR/into_iter_on_ref.rs:13:21
16 13 | let _ = [1,2,3].into_iter(); //~ ERROR equivalent to .iter()
17 | ^^^^^^^^^ help: call directly: `iter`
19 error: this .into_iter() call is equivalent to .iter() and will not move the Vec
20 --> $DIR/into_iter_on_ref.rs:15:28
22 15 | let _ = (&vec![1,2,3]).into_iter(); //~ WARN equivalent to .iter()
23 | ^^^^^^^^^ help: call directly: `iter`
25 = note: `-D clippy::into-iter-on-ref` implied by `-D warnings`
27 error: this .into_iter() call is equivalent to .iter() and will not move the slice
28 --> $DIR/into_iter_on_ref.rs:16:44
30 16 | let _ = vec![1,2,3].into_boxed_slice().into_iter(); //~ WARN equivalent to .iter()
31 | ^^^^^^^^^ help: call directly: `iter`
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
36 17 | let _ = std::rc::Rc::from(&[X][..]).into_iter(); //~ WARN equivalent to .iter()
37 | ^^^^^^^^^ help: call directly: `iter`
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
42 18 | let _ = std::sync::Arc::from(&[X][..]).into_iter(); //~ WARN equivalent to .iter()
43 | ^^^^^^^^^ help: call directly: `iter`
45 error: this .into_iter() call is equivalent to .iter() and will not move the array
46 --> $DIR/into_iter_on_ref.rs:20:30
48 20 | let _ = (&&&&&&&[1,2,3]).into_iter(); //~ ERROR equivalent to .iter()
49 | ^^^^^^^^^ help: call directly: `iter`
51 error: this .into_iter() call is equivalent to .iter() and will not move the array
52 --> $DIR/into_iter_on_ref.rs:21:34
54 21 | let _ = (&&&&mut &&&[1,2,3]).into_iter(); //~ ERROR equivalent to .iter()
55 | ^^^^^^^^^ help: call directly: `iter`
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:38
60 22 | let _ = (&mut &mut &mut [1,2,3]).into_iter(); //~ ERROR equivalent to .iter_mut()
61 | ^^^^^^^^^ help: call directly: `iter_mut`
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
66 24 | let _ = (&Some(4)).into_iter(); //~ WARN equivalent to .iter()
67 | ^^^^^^^^^ help: call directly: `iter`
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
72 25 | let _ = (&mut Some(5)).into_iter(); //~ WARN equivalent to .iter_mut()
73 | ^^^^^^^^^ help: call directly: `iter_mut`
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
78 26 | let _ = (&Ok::<_, i32>(6)).into_iter(); //~ WARN equivalent to .iter()
79 | ^^^^^^^^^ help: call directly: `iter`
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
84 27 | let _ = (&mut Err::<i32, _>(7)).into_iter(); //~ WARN equivalent to .iter_mut()
85 | ^^^^^^^^^ help: call directly: `iter_mut`
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
90 28 | let _ = (&Vec::<i32>::new()).into_iter(); //~ WARN equivalent to .iter()
91 | ^^^^^^^^^ help: call directly: `iter`
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
96 29 | let _ = (&mut Vec::<i32>::new()).into_iter(); //~ WARN equivalent to .iter_mut()
97 | ^^^^^^^^^ help: call directly: `iter_mut`
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
102 30 | let _ = (&BTreeMap::<i32, u64>::new()).into_iter(); //~ WARN equivalent to .iter()
103 | ^^^^^^^^^ help: call directly: `iter`
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
108 31 | let _ = (&mut BTreeMap::<i32, u64>::new()).into_iter(); //~ WARN equivalent to .iter_mut()
109 | ^^^^^^^^^ help: call directly: `iter_mut`
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
114 32 | let _ = (&VecDeque::<i32>::new()).into_iter(); //~ WARN equivalent to .iter()
115 | ^^^^^^^^^ help: call directly: `iter`
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
120 33 | let _ = (&mut VecDeque::<i32>::new()).into_iter(); //~ WARN equivalent to .iter_mut()
121 | ^^^^^^^^^ help: call directly: `iter_mut`
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
126 34 | let _ = (&LinkedList::<i32>::new()).into_iter(); //~ WARN equivalent to .iter()
127 | ^^^^^^^^^ help: call directly: `iter`
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
132 35 | let _ = (&mut LinkedList::<i32>::new()).into_iter(); //~ WARN equivalent to .iter_mut()
133 | ^^^^^^^^^ help: call directly: `iter_mut`
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
138 36 | let _ = (&HashMap::<i32, u64>::new()).into_iter(); //~ WARN equivalent to .iter()
139 | ^^^^^^^^^ help: call directly: `iter`
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
144 37 | let _ = (&mut HashMap::<i32, u64>::new()).into_iter(); //~ WARN equivalent to .iter_mut()
145 | ^^^^^^^^^ help: call directly: `iter_mut`
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
150 39 | let _ = (&BTreeSet::<i32>::new()).into_iter(); //~ WARN equivalent to .iter()
151 | ^^^^^^^^^ help: call directly: `iter`
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
156 40 | let _ = (&BinaryHeap::<i32>::new()).into_iter(); //~ WARN equivalent to .iter()
157 | ^^^^^^^^^ help: call directly: `iter`
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
162 41 | let _ = (&HashSet::<i32>::new()).into_iter(); //~ WARN equivalent to .iter()
163 | ^^^^^^^^^ help: call directly: `iter`
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
168 42 | let _ = std::path::Path::new("12/34").into_iter(); //~ WARN equivalent to .iter()
169 | ^^^^^^^^^ help: call directly: `iter`
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
174 43 | let _ = std::path::PathBuf::from("12/34").into_iter(); //~ ERROR equivalent to .iter()
175 | ^^^^^^^^^ help: call directly: `iter`
177 error: aborting due to 28 previous errors