diff --git a/library/core/src/iter/sources/from_fn.rs b/library/core/src/iter/sources/from_fn.rs index 1c7e1b30a2f88..21a1f53c24740 100644 --- a/library/core/src/iter/sources/from_fn.rs +++ b/library/core/src/iter/sources/from_fn.rs @@ -42,6 +42,7 @@ use crate::fmt; /// ``` #[inline] #[stable(feature = "iter_from_fn", since = "1.34.0")] +#[rustc_diagnostic_item = "iter_from_fn"] pub fn from_fn(f: F) -> FromFn where F: FnMut() -> Option, diff --git a/library/core/src/iter/sources/repeat_with.rs b/library/core/src/iter/sources/repeat_with.rs index d3cd74a448375..5998f9e56f0a1 100644 --- a/library/core/src/iter/sources/repeat_with.rs +++ b/library/core/src/iter/sources/repeat_with.rs @@ -62,6 +62,7 @@ use crate::ops::Try; /// ``` #[inline] #[stable(feature = "iterator_repeat_with", since = "1.28.0")] +#[rustc_diagnostic_item = "iter_repeat_with"] pub fn repeat_with A>(repeater: F) -> RepeatWith { RepeatWith { repeater } } diff --git a/library/core/src/iter/sources/successors.rs b/library/core/src/iter/sources/successors.rs index 5466131903f85..6c352dba20bb7 100644 --- a/library/core/src/iter/sources/successors.rs +++ b/library/core/src/iter/sources/successors.rs @@ -19,6 +19,7 @@ use crate::iter::FusedIterator; /// assert_eq!(powers_of_10.collect::>(), &[1, 10, 100, 1_000, 10_000]); /// ``` #[stable(feature = "iter_successors", since = "1.34.0")] +#[rustc_diagnostic_item = "iter_successors"] pub fn successors(first: Option, succ: F) -> Successors where F: FnMut(&T) -> Option,