1
Fork 0

Suggest impl Iterator when possible for _ return type

Address #106096.
This commit is contained in:
Esteban Küber 2022-12-26 17:44:16 -08:00
parent caa64e5b5e
commit 1b341fe8a1
5 changed files with 96 additions and 3 deletions

View file

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