From 321425386a079d4c8c86c205c3c674702a11996e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 8 Oct 2021 20:11:02 +0200 Subject: [PATCH] Fix invalid HTML generation for higher bounds --- src/librustdoc/html/format.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index bcd78b2adc085..c570392fecf24 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -270,7 +270,7 @@ crate fn print_where_clause<'a, 'tcx: 'a>( 0 => String::new(), _ if f.alternate() => { format!( - "for<{:#}> ", + "for<{:#}> ", comma_sep(bound_params.iter().map(|lt| lt.print())) ) } @@ -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<{}> ", + comma_sep(self.generic_params.iter().map(|g| g.print(cx))) + ) } else { Ok(()) }