@@ -8,160 +8,154 @@ LL | let _ = (&vec![1, 2, 3]).into_iter();
88 = help: to override `-D warnings` add `#[allow(clippy::into_iter_on_ref)]`
99
1010error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
11- --> tests/ui/into_iter_on_ref.rs:14:46
12- |
13- LL | let _ = vec![1, 2, 3].into_boxed_slice().into_iter();
14- | ^^^^^^^^^ help: call directly: `iter`
15-
16- error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
17- --> tests/ui/into_iter_on_ref.rs:15:41
11+ --> tests/ui/into_iter_on_ref.rs:14:41
1812 |
1913LL | let _ = std::rc::Rc::from(&[X][..]).into_iter();
2014 | ^^^^^^^^^ help: call directly: `iter`
2115
2216error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
23- --> tests/ui/into_iter_on_ref.rs:16 :44
17+ --> tests/ui/into_iter_on_ref.rs:15 :44
2418 |
2519LL | let _ = std::sync::Arc::from(&[X][..]).into_iter();
2620 | ^^^^^^^^^ help: call directly: `iter`
2721
2822error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array`
29- --> tests/ui/into_iter_on_ref.rs:18 :32
23+ --> tests/ui/into_iter_on_ref.rs:17 :32
3024 |
3125LL | let _ = (&&&&&&&[1, 2, 3]).into_iter();
3226 | ^^^^^^^^^ help: call directly: `iter`
3327
3428error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array`
35- --> tests/ui/into_iter_on_ref.rs:19 :36
29+ --> tests/ui/into_iter_on_ref.rs:18 :36
3630 |
3731LL | let _ = (&&&&mut &&&[1, 2, 3]).into_iter();
3832 | ^^^^^^^^^ help: call directly: `iter`
3933
4034error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `array`
41- --> tests/ui/into_iter_on_ref.rs:20 :40
35+ --> tests/ui/into_iter_on_ref.rs:19 :40
4236 |
4337LL | let _ = (&mut &mut &mut [1, 2, 3]).into_iter();
4438 | ^^^^^^^^^ help: call directly: `iter_mut`
4539
4640error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Option`
47- --> tests/ui/into_iter_on_ref.rs:22 :24
41+ --> tests/ui/into_iter_on_ref.rs:21 :24
4842 |
4943LL | let _ = (&Some(4)).into_iter();
5044 | ^^^^^^^^^ help: call directly: `iter`
5145
5246error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Option`
53- --> tests/ui/into_iter_on_ref.rs:23 :28
47+ --> tests/ui/into_iter_on_ref.rs:22 :28
5448 |
5549LL | let _ = (&mut Some(5)).into_iter();
5650 | ^^^^^^^^^ help: call directly: `iter_mut`
5751
5852error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Result`
59- --> tests/ui/into_iter_on_ref.rs:24 :32
53+ --> tests/ui/into_iter_on_ref.rs:23 :32
6054 |
6155LL | let _ = (&Ok::<_, i32>(6)).into_iter();
6256 | ^^^^^^^^^ help: call directly: `iter`
6357
6458error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Result`
65- --> tests/ui/into_iter_on_ref.rs:25 :37
59+ --> tests/ui/into_iter_on_ref.rs:24 :37
6660 |
6761LL | let _ = (&mut Err::<i32, _>(7)).into_iter();
6862 | ^^^^^^^^^ help: call directly: `iter_mut`
6963
7064error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
71- --> tests/ui/into_iter_on_ref.rs:26 :34
65+ --> tests/ui/into_iter_on_ref.rs:25 :34
7266 |
7367LL | let _ = (&Vec::<i32>::new()).into_iter();
7468 | ^^^^^^^^^ help: call directly: `iter`
7569
7670error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Vec`
77- --> tests/ui/into_iter_on_ref.rs:27 :38
71+ --> tests/ui/into_iter_on_ref.rs:26 :38
7872 |
7973LL | let _ = (&mut Vec::<i32>::new()).into_iter();
8074 | ^^^^^^^^^ help: call directly: `iter_mut`
8175
8276error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeMap`
83- --> tests/ui/into_iter_on_ref.rs:28 :44
77+ --> tests/ui/into_iter_on_ref.rs:27 :44
8478 |
8579LL | let _ = (&BTreeMap::<i32, u64>::new()).into_iter();
8680 | ^^^^^^^^^ help: call directly: `iter`
8781
8882error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `BTreeMap`
89- --> tests/ui/into_iter_on_ref.rs:29 :48
83+ --> tests/ui/into_iter_on_ref.rs:28 :48
9084 |
9185LL | let _ = (&mut BTreeMap::<i32, u64>::new()).into_iter();
9286 | ^^^^^^^^^ help: call directly: `iter_mut`
9387
9488error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque`
95- --> tests/ui/into_iter_on_ref.rs:30 :39
89+ --> tests/ui/into_iter_on_ref.rs:29 :39
9690 |
9791LL | let _ = (&VecDeque::<i32>::new()).into_iter();
9892 | ^^^^^^^^^ help: call directly: `iter`
9993
10094error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `VecDeque`
101- --> tests/ui/into_iter_on_ref.rs:31 :43
95+ --> tests/ui/into_iter_on_ref.rs:30 :43
10296 |
10397LL | let _ = (&mut VecDeque::<i32>::new()).into_iter();
10498 | ^^^^^^^^^ help: call directly: `iter_mut`
10599
106100error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `LinkedList`
107- --> tests/ui/into_iter_on_ref.rs:32 :41
101+ --> tests/ui/into_iter_on_ref.rs:31 :41
108102 |
109103LL | let _ = (&LinkedList::<i32>::new()).into_iter();
110104 | ^^^^^^^^^ help: call directly: `iter`
111105
112106error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `LinkedList`
113- --> tests/ui/into_iter_on_ref.rs:33 :45
107+ --> tests/ui/into_iter_on_ref.rs:32 :45
114108 |
115109LL | let _ = (&mut LinkedList::<i32>::new()).into_iter();
116110 | ^^^^^^^^^ help: call directly: `iter_mut`
117111
118112error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap`
119- --> tests/ui/into_iter_on_ref.rs:34 :43
113+ --> tests/ui/into_iter_on_ref.rs:33 :43
120114 |
121115LL | let _ = (&HashMap::<i32, u64>::new()).into_iter();
122116 | ^^^^^^^^^ help: call directly: `iter`
123117
124118error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `HashMap`
125- --> tests/ui/into_iter_on_ref.rs:35 :47
119+ --> tests/ui/into_iter_on_ref.rs:34 :47
126120 |
127121LL | let _ = (&mut HashMap::<i32, u64>::new()).into_iter();
128122 | ^^^^^^^^^ help: call directly: `iter_mut`
129123
130124error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeSet`
131- --> tests/ui/into_iter_on_ref.rs:37 :39
125+ --> tests/ui/into_iter_on_ref.rs:36 :39
132126 |
133127LL | let _ = (&BTreeSet::<i32>::new()).into_iter();
134128 | ^^^^^^^^^ help: call directly: `iter`
135129
136130error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `BinaryHeap`
137- --> tests/ui/into_iter_on_ref.rs:38 :41
131+ --> tests/ui/into_iter_on_ref.rs:37 :41
138132 |
139133LL | let _ = (&BinaryHeap::<i32>::new()).into_iter();
140134 | ^^^^^^^^^ help: call directly: `iter`
141135
142136error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashSet`
143- --> tests/ui/into_iter_on_ref.rs:39 :38
137+ --> tests/ui/into_iter_on_ref.rs:38 :38
144138 |
145139LL | let _ = (&HashSet::<i32>::new()).into_iter();
146140 | ^^^^^^^^^ help: call directly: `iter`
147141
148142error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Path`
149- --> tests/ui/into_iter_on_ref.rs:40 :43
143+ --> tests/ui/into_iter_on_ref.rs:39 :43
150144 |
151145LL | let _ = std::path::Path::new("12/34").into_iter();
152146 | ^^^^^^^^^ help: call directly: `iter`
153147
154148error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `PathBuf`
155- --> tests/ui/into_iter_on_ref.rs:41 :47
149+ --> tests/ui/into_iter_on_ref.rs:40 :47
156150 |
157151LL | let _ = std::path::PathBuf::from("12/34").into_iter();
158152 | ^^^^^^^^^ help: call directly: `iter`
159153
160154error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array`
161- --> tests/ui/into_iter_on_ref.rs:43 :26
155+ --> tests/ui/into_iter_on_ref.rs:42 :26
162156 |
163157LL | let _ = (&[1, 2, 3]).into_iter().next();
164158 | ^^^^^^^^^ help: call directly: `iter`
165159
166- error: aborting due to 27 previous errors
160+ error: aborting due to 26 previous errors
167161
0 commit comments