Skip to content

Commit

Permalink
Fix invalid HTML generation for higher bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 9, 2021
1 parent 44995f7 commit 3214253
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ crate fn print_where_clause<'a, 'tcx: 'a>(
0 => String::new(),
_ if f.alternate() => {
format!(
"for<{:#}> ",
"for&lt;{:#}&gt; ",
comma_sep(bound_params.iter().map(|lt| lt.print()))
)
}
Expand Down Expand Up @@ -1059,7 +1059,11 @@ impl clean::BareFunctionDecl {
) -> impl fmt::Display + 'a + Captures<'tcx> {
display_fn(move |f| {
if !self.generic_params.is_empty() {
write!(f, "for<{}> ", comma_sep(self.generic_params.iter().map(|g| g.print(cx))))
write!(
f,
"for&lt;{}&gt; ",
comma_sep(self.generic_params.iter().map(|g| g.print(cx)))
)
} else {
Ok(())
}
Expand Down

0 comments on commit 3214253

Please sign in to comment.