Skip to content

Remove unnecessary structhead parameter from render_union #87464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ fn item_union(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::Uni
wrap_into_docblock(w, |w| {
w.write_str("<pre class=\"rust union\">");
render_attributes_in_pre(w, it, "");
render_union(w, it, Some(&s.generics), &s.fields, "", true, cx);
render_union(w, it, Some(&s.generics), &s.fields, "", cx);
w.write_str("</pre>")
});

Expand Down Expand Up @@ -1380,14 +1380,12 @@ fn render_union(
g: Option<&clean::Generics>,
fields: &[clean::Item],
tab: &str,
structhead: bool,
cx: &Context<'_>,
) {
write!(
w,
"{}{}{}",
"{}union {}",
it.visibility.print_with_space(it.def_id, cx),
if structhead { "union " } else { "" },
it.name.as_ref().unwrap()
);
if let Some(g) = g {
Expand Down