Skip to content

Commit 02babb9

Browse files
committed
Suggest collecting into Vec<_>
1 parent 99fa2e3 commit 02babb9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/iter/traits/iterator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,6 +1829,7 @@ pub trait Iterator {
18291829
#[inline]
18301830
#[stable(feature = "rust1", since = "1.0.0")]
18311831
#[must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]
1832+
#[cfg_attr(not(test), rustc_diagnostic_item = "iterator_collect_fn")]
18321833
fn collect<B: FromIterator<Self::Item>>(self) -> B
18331834
where
18341835
Self: Sized,

0 commit comments

Comments
 (0)