Rollup merge of #89700 - GuillaumeGomez:fix-rustdoc-higher-bound-html-gen, r=notriddle
Fix invalid HTML generation for higher bounds Considering this is a bug, I cherry-picked the commit from #89676 so it's merged more quickly. r? ``@notriddle``
This commit is contained in:
commit
3e93472aa5
1 changed files with 6 additions and 2 deletions
|
@ -270,7 +270,7 @@ crate fn print_where_clause<'a, 'tcx: 'a>(
|
||||||
0 => String::new(),
|
0 => String::new(),
|
||||||
_ if f.alternate() => {
|
_ if f.alternate() => {
|
||||||
format!(
|
format!(
|
||||||
"for<{:#}> ",
|
"for<{:#}> ",
|
||||||
comma_sep(bound_params.iter().map(|lt| lt.print()))
|
comma_sep(bound_params.iter().map(|lt| lt.print()))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1059,7 +1059,11 @@ impl clean::BareFunctionDecl {
|
||||||
) -> impl fmt::Display + 'a + Captures<'tcx> {
|
) -> impl fmt::Display + 'a + Captures<'tcx> {
|
||||||
display_fn(move |f| {
|
display_fn(move |f| {
|
||||||
if !self.generic_params.is_empty() {
|
if !self.generic_params.is_empty() {
|
||||||
write!(f, "for<{}> ", comma_sep(self.generic_params.iter().map(|g| g.print(cx))))
|
write!(
|
||||||
|
f,
|
||||||
|
"for<{}> ",
|
||||||
|
comma_sep(self.generic_params.iter().map(|g| g.print(cx)))
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue