Skip to content

Commit fb05526

Browse files
authored
Rollup merge of #105523 - estebank:suggest-collect-vec, r=compiler-errors
Suggest `collect`ing into `Vec<_>` Fix #105510.
2 parents 844982c + 02babb9 commit fb05526

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)