@@ -8,160 +8,154 @@ LL | let _ = (&vec![1, 2, 3]).into_iter();
8
8
= help: to override `-D warnings` add `#[allow(clippy::into_iter_on_ref)]`
9
9
10
10
error: 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
18
12
|
19
13
LL | let _ = std::rc::Rc::from(&[X][..]).into_iter();
20
14
| ^^^^^^^^^ help: call directly: `iter`
21
15
22
16
error: 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
24
18
|
25
19
LL | let _ = std::sync::Arc::from(&[X][..]).into_iter();
26
20
| ^^^^^^^^^ help: call directly: `iter`
27
21
28
22
error: 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
30
24
|
31
25
LL | let _ = (&&&&&&&[1, 2, 3]).into_iter();
32
26
| ^^^^^^^^^ help: call directly: `iter`
33
27
34
28
error: 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
36
30
|
37
31
LL | let _ = (&&&&mut &&&[1, 2, 3]).into_iter();
38
32
| ^^^^^^^^^ help: call directly: `iter`
39
33
40
34
error: 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
42
36
|
43
37
LL | let _ = (&mut &mut &mut [1, 2, 3]).into_iter();
44
38
| ^^^^^^^^^ help: call directly: `iter_mut`
45
39
46
40
error: 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
48
42
|
49
43
LL | let _ = (&Some(4)).into_iter();
50
44
| ^^^^^^^^^ help: call directly: `iter`
51
45
52
46
error: 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
54
48
|
55
49
LL | let _ = (&mut Some(5)).into_iter();
56
50
| ^^^^^^^^^ help: call directly: `iter_mut`
57
51
58
52
error: 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
60
54
|
61
55
LL | let _ = (&Ok::<_, i32>(6)).into_iter();
62
56
| ^^^^^^^^^ help: call directly: `iter`
63
57
64
58
error: 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
66
60
|
67
61
LL | let _ = (&mut Err::<i32, _>(7)).into_iter();
68
62
| ^^^^^^^^^ help: call directly: `iter_mut`
69
63
70
64
error: 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
72
66
|
73
67
LL | let _ = (&Vec::<i32>::new()).into_iter();
74
68
| ^^^^^^^^^ help: call directly: `iter`
75
69
76
70
error: 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
78
72
|
79
73
LL | let _ = (&mut Vec::<i32>::new()).into_iter();
80
74
| ^^^^^^^^^ help: call directly: `iter_mut`
81
75
82
76
error: 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
84
78
|
85
79
LL | let _ = (&BTreeMap::<i32, u64>::new()).into_iter();
86
80
| ^^^^^^^^^ help: call directly: `iter`
87
81
88
82
error: 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
90
84
|
91
85
LL | let _ = (&mut BTreeMap::<i32, u64>::new()).into_iter();
92
86
| ^^^^^^^^^ help: call directly: `iter_mut`
93
87
94
88
error: 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
96
90
|
97
91
LL | let _ = (&VecDeque::<i32>::new()).into_iter();
98
92
| ^^^^^^^^^ help: call directly: `iter`
99
93
100
94
error: 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
102
96
|
103
97
LL | let _ = (&mut VecDeque::<i32>::new()).into_iter();
104
98
| ^^^^^^^^^ help: call directly: `iter_mut`
105
99
106
100
error: 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
108
102
|
109
103
LL | let _ = (&LinkedList::<i32>::new()).into_iter();
110
104
| ^^^^^^^^^ help: call directly: `iter`
111
105
112
106
error: 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
114
108
|
115
109
LL | let _ = (&mut LinkedList::<i32>::new()).into_iter();
116
110
| ^^^^^^^^^ help: call directly: `iter_mut`
117
111
118
112
error: 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
120
114
|
121
115
LL | let _ = (&HashMap::<i32, u64>::new()).into_iter();
122
116
| ^^^^^^^^^ help: call directly: `iter`
123
117
124
118
error: 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
126
120
|
127
121
LL | let _ = (&mut HashMap::<i32, u64>::new()).into_iter();
128
122
| ^^^^^^^^^ help: call directly: `iter_mut`
129
123
130
124
error: 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
132
126
|
133
127
LL | let _ = (&BTreeSet::<i32>::new()).into_iter();
134
128
| ^^^^^^^^^ help: call directly: `iter`
135
129
136
130
error: 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
138
132
|
139
133
LL | let _ = (&BinaryHeap::<i32>::new()).into_iter();
140
134
| ^^^^^^^^^ help: call directly: `iter`
141
135
142
136
error: 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
144
138
|
145
139
LL | let _ = (&HashSet::<i32>::new()).into_iter();
146
140
| ^^^^^^^^^ help: call directly: `iter`
147
141
148
142
error: 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
150
144
|
151
145
LL | let _ = std::path::Path::new("12/34").into_iter();
152
146
| ^^^^^^^^^ help: call directly: `iter`
153
147
154
148
error: 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
156
150
|
157
151
LL | let _ = std::path::PathBuf::from("12/34").into_iter();
158
152
| ^^^^^^^^^ help: call directly: `iter`
159
153
160
154
error: 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
162
156
|
163
157
LL | let _ = (&[1, 2, 3]).into_iter().next();
164
158
| ^^^^^^^^^ help: call directly: `iter`
165
159
166
- error: aborting due to 27 previous errors
160
+ error: aborting due to 26 previous errors
167
161
0 commit comments