Skip to content

Commit 84b8ef3

Browse files
authored
Rollup merge of #106172 - estebank:suggest-impl-trait, r=compiler-errors
Suggest `impl Iterator` when possible for `_` return type Address #106096.
2 parents 2d174ec + b27b37a commit 84b8ef3

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)