STD documentation doesn't show associated types bound


I was checking some documentation of Rust STD and I noticed that traits bound for associated types are not always documented. For example IntoIterator:

pub trait IntoIterator {
    type Item;
    type IntoIter: Iterator;
    fn into_iter(self) -> Self::IntoIter;

It is not showing that type of IntoIter is actually bounded to be Iterator<Item = Self::Item>.
I was wondering why it is not documented and I think in some case could be misleading.

If I am not wrong cargo doc should by default (I made a quick check) document traits bound for associated types.

What do you think?

Thank you

See this issue: Rustdoc does not show bounds on associated items in the declaration of re-exported traits · Issue #84579 · rust-lang/rust · GitHub


It's interesting that the issue still exists (doc of re-exported vs original items). Check the "original" doc for IntoIterator under libcore here, where it doesn't have this problem :slightly_smiling_face: : IntoIterator in core::iter - Rust

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.