1
Fork 0

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``
This commit is contained in:
Matthias Krüger 2021-12-02 22:16:08 +01:00 committed by GitHub
commit 444635df25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 1 deletions

View file

@ -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));