diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-10-09 17:08:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-09 17:08:41 +0200 |
| commit | 3e93472aa52819024523ddbb77b02afecf7ec351 (patch) | |
| tree | d93dc45b5599e761bd0617b57ff2a2de75a6976a | |
| parent | 9f32ab88af7af95efefe0a3990302c6bc4f78ccd (diff) | |
| parent | 321425386a079d4c8c86c205c3c674702a11996e (diff) | |
| download | rust-3e93472aa52819024523ddbb77b02afecf7ec351.tar.gz rust-3e93472aa52819024523ddbb77b02afecf7ec351.zip | |
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``
| -rw-r--r-- | src/librustdoc/html/format.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index bcd78b2adc0..c570392fecf 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(()) } |
