about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2022-12-26 17:44:16 -0800
committerEsteban Küber <esteban@kuber.com.ar>2022-12-26 18:21:45 -0800
commit1b341fe8a1ce3c4922b5e39aee6c4375e05b6750 (patch)
tree6d1c5394974f67e1f4bdb314b3a492917678c506 /library/core/src
parentcaa64e5b5e7605a1c1428b2a402021bef83f3e1e (diff)
downloadrust-1b341fe8a1ce3c4922b5e39aee6c4375e05b6750.tar.gz
rust-1b341fe8a1ce3c4922b5e39aee6c4375e05b6750.zip
Suggest `impl Iterator` when possible for `_` return type
Address #106096.
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/iter/traits/iterator.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs
index bac836292f8..dcbed4e963f 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -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;