Skip to content

Commit 3e93472

Browse files
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``
2 parents 9f32ab8 + 3214253 commit 3e93472

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: src/librustdoc/html/format.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ crate fn print_where_clause<'a, 'tcx: 'a>(
270270
0 => String::new(),
271271
_ if f.alternate() => {
272272
format!(
273-
"for<{:#}> ",
273+
"for&lt;{:#}&gt; ",
274274
comma_sep(bound_params.iter().map(|lt| lt.print()))
275275
)
276276
}
@@ -1059,7 +1059,11 @@ impl clean::BareFunctionDecl {
10591059
) -> impl fmt::Display + 'a + Captures<'tcx> {
10601060
display_fn(move |f| {
10611061
if !self.generic_params.is_empty() {
1062-
write!(f, "for<{}> ", comma_sep(self.generic_params.iter().map(|g| g.print(cx))))
1062+
write!(
1063+
f,
1064+
"for&lt;{}&gt; ",
1065+
comma_sep(self.generic_params.iter().map(|g| g.print(cx)))
1066+
)
10631067
} else {
10641068
Ok(())
10651069
}

0 commit comments

Comments
 (0)