about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-02 22:16:08 +0100
committerGitHub <noreply@github.com>2021-12-02 22:16:08 +0100
commit444635df25c7a2192147c179bb981492ae05b967 (patch)
tree6fd1ace7fd2e05890c28e57e3e33d530b3fd2a8e /src/librustdoc/html
parente5038e20999eef35260b070189883edc2a8a34b2 (diff)
parent5c75a4857ee447437ca71b981eadfb1a38ad7268 (diff)
downloadrust-444635df25c7a2192147c179bb981492ae05b967.tar.gz
rust-444635df25c7a2192147c179bb981492ae05b967.zip
Rollup merge of #89954 - GuillaumeGomez:legacy-const-generic-doc, r=Amanieu
Fix legacy_const_generic doc arguments display

Fixes https://github.com/rust-lang/rust/issues/83167.

cc ``@Amanieu``
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/format.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index fdb52703edf..25471dd726d 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -1177,6 +1177,10 @@ impl clean::FnDecl {
                     args.push_str(" <br>");
                     args_plain.push(' ');
                 }
+                if input.is_const {
+                    args.push_str("const ");
+                    args_plain.push_str("const ");
+                }
                 if !input.name.is_empty() {
                     args.push_str(&format!("{}: ", input.name));
                     args_plain.push_str(&format!("{}: ", input.name));