diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-12-26 17:44:16 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-12-26 18:21:45 -0800 |
| commit | 1b341fe8a1ce3c4922b5e39aee6c4375e05b6750 (patch) | |
| tree | 6d1c5394974f67e1f4bdb314b3a492917678c506 /library/core/src | |
| parent | caa64e5b5e7605a1c1428b2a402021bef83f3e1e (diff) | |
| download | rust-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.rs | 1 |
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; |
