<p dir="auto">At the moment, the summary for the IntoIterator trait definition reads:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pub trait IntoIterator where Self::IntoIter::Item == Self::Item {
    type Item;
    type IntoIter: Iterator;
    fn into_iter(self) -&gt; Self::IntoIter;
}"><pre class="notranslate"><code class="notranslate">pub trait IntoIterator where Self::IntoIter::Item == Self::Item {
    type Item;
    type IntoIter: Iterator;
    fn into_iter(self) -&gt; Self::IntoIter;
}
</code></pre></div>
<p dir="auto">The 'where' clause on the first line isn't valid Rust, which is confusing. It should instead be rendered the way it appears in the code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pub trait IntoIterator {
    type Item;
    type IntoIter: Iterator&lt;Item=Self::Item&gt;;
    fn into_iter(self) -&gt; Self::IntoIter;
}"><pre class="notranslate"><code class="notranslate">pub trait IntoIterator {
    type Item;
    type IntoIter: Iterator&lt;Item=Self::Item&gt;;
    fn into_iter(self) -&gt; Self::IntoIter;
}
</code></pre></div>
<p dir="auto">(On #rust <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexcrichton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexcrichton">@alexcrichton</a> said, "that's probably all located in <a href="https://github.com/rust-lang/rust/blob/master/src/librustdoc/clean/simplify.rs">https://github.com/rust-lang/rust/blob/master/src/librustdoc/clean/simplify.rs</a>")</p>
<p dir="auto">The documentation for <code class="notranslate">IntoIterator</code> is inconsistent in how it shows the <code class="notranslate">Item</code> constraints.</p>
<p dir="auto">The actual trait declaration looks like this:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pub trait IntoIterator {
    type Item;
    type IntoIter: Iterator&lt;Item = Self::Item&gt;;
    fn into_iter(self) -&gt; Self::IntoIter;
}"><pre class="notranslate"><span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">IntoIterator</span> <span class="pl-kos">{</span>
    <span class="pl-k">type</span> <span class="pl-smi">Item</span><span class="pl-kos">;</span>
    <span class="pl-k">type</span> <span class="pl-smi">IntoIter</span><span class="pl-kos">:</span> <span class="pl-smi">Iterator</span><span class="pl-kos">&lt;</span><span class="pl-smi">Item</span> = <span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">Item</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span>
    <span class="pl-k">fn</span> <span class="pl-en">into_iter</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">IntoIter</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The <a href="https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html" rel="nofollow">nightly <code class="notranslate">core</code> documentation</a> matches this declaration as of 1.49.0-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/3525087ada7018ef227b10846648660b7f07b6d1/hovercard" href="https://github.com/rust-lang/rust/commit/3525087ada7018ef227b10846648660b7f07b6d1"><tt>3525087</tt></a> 2020-10-08). This is good.</p>
<p dir="auto">However, the <a href="https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html" rel="nofollow">nightly <code class="notranslate">std</code> documentation</a> shows no <code class="notranslate">Item</code> constraints at all:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pub trait IntoIterator {
    type Item;
    type IntoIter: Iterator;
    fn into_iter(self) -&gt; Self::IntoIter;
}"><pre class="notranslate"><span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">IntoIterator</span> <span class="pl-kos">{</span>
    <span class="pl-k">type</span> <span class="pl-smi">Item</span><span class="pl-kos">;</span>
    <span class="pl-k">type</span> <span class="pl-smi">IntoIter</span><span class="pl-kos">:</span> <span class="pl-smi">Iterator</span><span class="pl-kos">;</span>
    <span class="pl-k">fn</span> <span class="pl-en">into_iter</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">IntoIter</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The <a href="https://doc.rust-lang.org/beta/std/iter/trait.IntoIterator.html" rel="nofollow"><code class="notranslate">std</code> documentation for 1.48.0-beta.2</a> is even weirder, using an equality constraint that's not supported (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52522748" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/20041" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/20041/hovercard" href="https://github.com/rust-lang/rust/issues/20041">#20041</a>), and this goes all the way back to <a href="https://doc.rust-lang.org/1.0.0/std/iter/trait.IntoIterator.html" rel="nofollow">1.0.0</a>.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pub trait IntoIterator
where
    &lt;Self::IntoIter as Iterator&gt;::Item == Self::Item,
{
    type Item;
    type IntoIter: Iterator;
    fn into_iter(self) -&gt; Self::IntoIter;
}"><pre class="notranslate"><span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">IntoIterator</span>
<span class="pl-k">where</span>
    &lt;<span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">IntoIter</span> <span class="pl-k">as</span> <span class="pl-smi">Iterator</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">Item</span> == <span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">Item</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
    <span class="pl-k">type</span> <span class="pl-smi">Item</span><span class="pl-kos">;</span>
    <span class="pl-k">type</span> <span class="pl-smi">IntoIter</span><span class="pl-kos">:</span> <span class="pl-smi">Iterator</span><span class="pl-kos">;</span>
    <span class="pl-k">fn</span> <span class="pl-en">into_iter</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">IntoIter</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>