You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It shows in both the declaration code and under the “Associated Types” heading: (sans semicolon in the latter)
typeIntoIter:Iterator;
This is lacking a crucial part of the bound, the Item associated type. The source shows this:
typeIntoIter:Iterator<Item = Self::Item>;
I’m confused about what’s going on here because my attempts at duplicating it are unsuccessful on both stable and nightly: when I compile the docs for just this code:
I see Iterator<Item = Self::Item> as expected, not Iterator as in the std docs. Hence my titling this bug about IntoIterator::IntoIter, rather than about associated types or whatnot, because I can’t reproduce it elsewhere.
The text was updated successfully, but these errors were encountered:
I just checked on old docs. Until 1.48.0, it looks like rustdoc translated that associated type bound to where <Self::IntoIter as Iterator>::Item == Self::Item in the declaration (or similar; back in 1.0.0 it was where Self::IntoIter::Item == Self::Item), but in 1.49 even that vanished.
No idea why it would be translating that associated type bound, especially since non-std docs aren’t doing it.
Haaaaaang on, core isn’t exhibiting this wonkiness either, core::iter::IntoIterator is correct (and never exhibited the translation into a where clause).
Refer to the
std::iter::IntoIterator
docs (and the problem is also visible on nightly).It shows in both the declaration code and under the “Associated Types” heading: (sans semicolon in the latter)
This is lacking a crucial part of the bound, the
Item
associated type. The source shows this:I’m confused about what’s going on here because my attempts at duplicating it are unsuccessful on both stable and nightly: when I compile the docs for just this code:
I see
Iterator<Item = Self::Item>
as expected, notIterator
as in the std docs. Hence my titling this bug aboutIntoIterator::IntoIter
, rather than about associated types or whatnot, because I can’t reproduce it elsewhere.The text was updated successfully, but these errors were encountered: