Skip to content

Commit 7badb7a

Browse files
committed
avoid applying in-place collect specialization in type-length test
the test was sized to match external iteration only, since vec's in-place collect now uses internal iteration we collect into a different type now. Note that any other try-fold based operation such as count() would also have exceeded the type length limit for that iterator.
1 parent a62cd1b commit 7badb7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/ui/iterators/issue-58952-filter-type-length.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//! so check that we don't accidentially exceed the type length limit.
44
// FIXME: Once the size of iterator adaptors is further reduced,
55
// increase the complexity of this test.
6+
use std::collections::VecDeque;
67

78
fn main() {
89
let c = 2;
@@ -27,5 +28,5 @@ fn main() {
2728
.filter(|a| b.clone().any(|b| *b == *a))
2829
.filter(|a| b.clone().any(|b| *b == *a))
2930
.filter(|a| b.clone().any(|b| *b == *a))
30-
.collect::<Vec<_>>();
31+
.collect::<VecDeque<_>>();
3132
}

0 commit comments

Comments
 (0)