Skip to content

Commit b27b37a

Browse files
committed
Suggest impl Iterator when possible for _ return type
Address #106096.
1 parent 234990c commit b27b37a

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
@@ -66,6 +66,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item = ()>) {}
6666
#[must_use = "iterators are lazy and do nothing unless consumed"]
6767
pub trait Iterator {
6868
/// The type of the elements being iterated over.
69+
#[rustc_diagnostic_item = "IteratorItem"]
6970
#[stable(feature = "rust1", since = "1.0.0")]
7071
type Item;
7172

0 commit comments

Comments
 (0)