Rollup merge of #87451 - GuillaumeGomez:tuple-struct-field-doc, r=jyn514

Add support for tuple struct field documentation

Fixes  #42615.
This is #80320 updated to new codebase and with added tests.
Part of https://github.com/rust-lang/rust/issues/83255.

cc ```@camelid``` (since you were involved on the original PR).
r? ```@jyn514```
This commit is contained in:
Yuki Okushi
2021-07-29 06:11:45 +09:00
committed by GitHub
6 changed files with 66 additions and 19 deletions

View File

@@ -2007,6 +2007,9 @@ fn sidebar_struct(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, s: &clea
}
sidebar.push_str("</div>");
} else if let CtorKind::Fn = s.struct_type {
sidebar
.push_str("<h3 class=\"sidebar-title\"><a href=\"#fields\">Tuple Fields</a></h3>");
}
}