Closed
Description
Similar to #60403
For example, when one generates rustdoc for something that implements Iterator, the generated HTML is (with manual pretty-printing)
<h4 id='method.collect' class="method">
<code id='collect.v'>
<div class="docblock attributes">
#[must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]
</div>
fn
<a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.collect'
class='fnname'>collect</a>
<B>(self) -> B
<span class="where fmt-newline">
where<br> B:
<a class="trait"
href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html"
title="trait core::iter::traits::collect::FromIterator">FromIterator</a>
<Self::
<a class="type"
href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item"
title="type core::iter::traits::iterator::Iterator::Item">Item</a>
>,
</span>
</code>
<span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span>
<a class='srclink'
href='https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1464-1466'
title='goto source code'>[src]</a>
</h4>
This HTML contradicts HTML spec, and causes problems when parsed by a strict parser ( such as html-tidy )
Additionally, this renders very oddly:
rustc --version
#rustc 1.36.0-nightly (372be4f36 2019-05-14)