Skip to content

Commit bd0d306

Browse files
Remove a clippy test that doesn't apply anymore
1 parent bc6b70f commit bd0d306

File tree

3 files changed

+26
-34
lines changed

3 files changed

+26
-34
lines changed

src/tools/clippy/tests/ui/into_iter_on_ref.fixed

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ fn main() {
1111

1212
let _ = vec![1, 2, 3].into_iter();
1313
let _ = (&vec![1, 2, 3]).iter(); //~ ERROR: equivalent to `.iter()
14-
let _ = vec![1, 2, 3].into_boxed_slice().iter(); //~ ERROR: equivalent to `.iter()
1514
let _ = std::rc::Rc::from(&[X][..]).iter(); //~ ERROR: equivalent to `.iter()
1615
let _ = std::sync::Arc::from(&[X][..]).iter(); //~ ERROR: equivalent to `.iter()
1716

src/tools/clippy/tests/ui/into_iter_on_ref.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ fn main() {
1111

1212
let _ = vec![1, 2, 3].into_iter();
1313
let _ = (&vec![1, 2, 3]).into_iter(); //~ ERROR: equivalent to `.iter()
14-
let _ = vec![1, 2, 3].into_boxed_slice().into_iter(); //~ ERROR: equivalent to `.iter()
1514
let _ = std::rc::Rc::from(&[X][..]).into_iter(); //~ ERROR: equivalent to `.iter()
1615
let _ = std::sync::Arc::from(&[X][..]).into_iter(); //~ ERROR: equivalent to `.iter()
1716

src/tools/clippy/tests/ui/into_iter_on_ref.stderr

+26-32
Original file line numberDiff line numberDiff line change
@@ -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

1010
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
1812
|
1913
LL | let _ = std::rc::Rc::from(&[X][..]).into_iter();
2014
| ^^^^^^^^^ help: call directly: `iter`
2115

2216
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
2418
|
2519
LL | let _ = std::sync::Arc::from(&[X][..]).into_iter();
2620
| ^^^^^^^^^ help: call directly: `iter`
2721

2822
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
3024
|
3125
LL | let _ = (&&&&&&&[1, 2, 3]).into_iter();
3226
| ^^^^^^^^^ help: call directly: `iter`
3327

3428
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
3630
|
3731
LL | let _ = (&&&&mut &&&[1, 2, 3]).into_iter();
3832
| ^^^^^^^^^ help: call directly: `iter`
3933

4034
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
4236
|
4337
LL | let _ = (&mut &mut &mut [1, 2, 3]).into_iter();
4438
| ^^^^^^^^^ help: call directly: `iter_mut`
4539

4640
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
4842
|
4943
LL | let _ = (&Some(4)).into_iter();
5044
| ^^^^^^^^^ help: call directly: `iter`
5145

5246
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
5448
|
5549
LL | let _ = (&mut Some(5)).into_iter();
5650
| ^^^^^^^^^ help: call directly: `iter_mut`
5751

5852
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
6054
|
6155
LL | let _ = (&Ok::<_, i32>(6)).into_iter();
6256
| ^^^^^^^^^ help: call directly: `iter`
6357

6458
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
6660
|
6761
LL | let _ = (&mut Err::<i32, _>(7)).into_iter();
6862
| ^^^^^^^^^ help: call directly: `iter_mut`
6963

7064
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
7266
|
7367
LL | let _ = (&Vec::<i32>::new()).into_iter();
7468
| ^^^^^^^^^ help: call directly: `iter`
7569

7670
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
7872
|
7973
LL | let _ = (&mut Vec::<i32>::new()).into_iter();
8074
| ^^^^^^^^^ help: call directly: `iter_mut`
8175

8276
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
8478
|
8579
LL | let _ = (&BTreeMap::<i32, u64>::new()).into_iter();
8680
| ^^^^^^^^^ help: call directly: `iter`
8781

8882
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
9084
|
9185
LL | let _ = (&mut BTreeMap::<i32, u64>::new()).into_iter();
9286
| ^^^^^^^^^ help: call directly: `iter_mut`
9387

9488
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
9690
|
9791
LL | let _ = (&VecDeque::<i32>::new()).into_iter();
9892
| ^^^^^^^^^ help: call directly: `iter`
9993

10094
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
10296
|
10397
LL | let _ = (&mut VecDeque::<i32>::new()).into_iter();
10498
| ^^^^^^^^^ help: call directly: `iter_mut`
10599

106100
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
108102
|
109103
LL | let _ = (&LinkedList::<i32>::new()).into_iter();
110104
| ^^^^^^^^^ help: call directly: `iter`
111105

112106
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
114108
|
115109
LL | let _ = (&mut LinkedList::<i32>::new()).into_iter();
116110
| ^^^^^^^^^ help: call directly: `iter_mut`
117111

118112
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
120114
|
121115
LL | let _ = (&HashMap::<i32, u64>::new()).into_iter();
122116
| ^^^^^^^^^ help: call directly: `iter`
123117

124118
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
126120
|
127121
LL | let _ = (&mut HashMap::<i32, u64>::new()).into_iter();
128122
| ^^^^^^^^^ help: call directly: `iter_mut`
129123

130124
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
132126
|
133127
LL | let _ = (&BTreeSet::<i32>::new()).into_iter();
134128
| ^^^^^^^^^ help: call directly: `iter`
135129

136130
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
138132
|
139133
LL | let _ = (&BinaryHeap::<i32>::new()).into_iter();
140134
| ^^^^^^^^^ help: call directly: `iter`
141135

142136
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
144138
|
145139
LL | let _ = (&HashSet::<i32>::new()).into_iter();
146140
| ^^^^^^^^^ help: call directly: `iter`
147141

148142
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
150144
|
151145
LL | let _ = std::path::Path::new("12/34").into_iter();
152146
| ^^^^^^^^^ help: call directly: `iter`
153147

154148
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
156150
|
157151
LL | let _ = std::path::PathBuf::from("12/34").into_iter();
158152
| ^^^^^^^^^ help: call directly: `iter`
159153

160154
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
162156
|
163157
LL | 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

Comments
 (0)