1
Fork 0

Rollup merge of #101245 - GuillaumeGomez:remove-unneeded-where-whitespace, r=notriddle

Remove unneeded where whitespace

It fixes these two bugs:

![Screenshot from 2022-08-31 18-14-40](https://user-images.githubusercontent.com/3050060/187727950-94657419-abfa-454c-9d27-004280fbcb45.png)
![Screenshot from 2022-08-31 18-14-49](https://user-images.githubusercontent.com/3050060/187727956-21d1b39d-62d7-4e7b-8f6f-631ceda67a19.png)

It's a relic from a very old time (this commit: bfd01b7f40).

You can test the result [here](https://rustdoc.crud.net/imperio/remove-unneeded-where-whitespace/lib2/struct.WhereWhitespace.html).

cc `````````@jsha`````````
r? `````````@notriddle`````````
This commit is contained in:
Matthias Krüger 2022-09-01 21:37:11 +02:00 committed by GitHub
commit 21c8447d78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 114 additions and 67 deletions

View file

@ -1737,8 +1737,8 @@ pub(crate) fn render_impl_summary(
// in documentation pages for trait with automatic implementations like "Send" and "Sync".
aliases: &[String],
) {
let id =
cx.derive_id(get_id_for_impl(&i.inner_impl().for_, i.inner_impl().trait_.as_ref(), cx));
let inner_impl = i.inner_impl();
let id = cx.derive_id(get_id_for_impl(&inner_impl.for_, inner_impl.trait_.as_ref(), cx));
let aliases = if aliases.is_empty() {
String::new()
} else {
@ -1750,9 +1750,9 @@ pub(crate) fn render_impl_summary(
write!(w, "<h3 class=\"code-header in-band\">");
if let Some(use_absolute) = use_absolute {
write!(w, "{}", i.inner_impl().print(use_absolute, cx));
write!(w, "{}", inner_impl.print(use_absolute, cx));
if show_def_docs {
for it in &i.inner_impl().items {
for it in &inner_impl.items {
if let clean::AssocTypeItem(ref tydef, ref _bounds) = *it.kind {
w.write_str("<span class=\"where fmt-newline\"> ");
assoc_type(
@ -1770,11 +1770,11 @@ pub(crate) fn render_impl_summary(
}
}
} else {
write!(w, "{}", i.inner_impl().print(false, cx));
write!(w, "{}", inner_impl.print(false, cx));
}
write!(w, "</h3>");
let is_trait = i.inner_impl().trait_.is_some();
let is_trait = inner_impl.trait_.is_some();
if is_trait {
if let Some(portability) = portability(&i.impl_item, Some(parent)) {
write!(w, "<span class=\"item-info\">{}</span>", portability);