Skip to content

Commit

Permalink
rustdoc: Remove unused _default parameter
Browse files Browse the repository at this point in the history
It can always be re-added later if we decide to display associated const
default values.
  • Loading branch information
camelid committed Dec 11, 2021
1 parent d38ae76 commit 719d7a5
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,6 @@ fn assoc_const(
w: &mut Buffer,
it: &clean::Item,
ty: &clean::Type,
_default: Option<&clean::ConstantKind>,
link: AssocItemLink<'_>,
extra: &str,
cx: &Context<'_>,
Expand Down Expand Up @@ -958,15 +957,9 @@ fn render_assoc_item(
clean::MethodItem(ref m, _) => {
method(w, item, m.header, &m.generics, &m.decl, link, parent, cx, render_mode)
}
clean::AssocConstItem(ref ty, ref default) => assoc_const(
w,
item,
ty,
default.as_ref(),
link,
if parent == ItemType::Trait { " " } else { "" },
cx,
),
clean::AssocConstItem(ref ty, _) => {
assoc_const(w, item, ty, link, if parent == ItemType::Trait { " " } else { "" }, cx)
}
clean::AssocTypeItem(ref bounds, ref default) => assoc_type(
w,
item,
Expand Down Expand Up @@ -1467,7 +1460,7 @@ fn render_impl(
w.write_str("</h4>");
w.write_str("</div>");
}
clean::AssocConstItem(ref ty, ref default) => {
clean::AssocConstItem(ref ty, _) => {
let source_id = format!("{}.{}", item_type, name);
let id = cx.derive_id(source_id.clone());
write!(
Expand All @@ -1482,7 +1475,6 @@ fn render_impl(
w,
item,
ty,
default.as_ref(),
link.anchor(if trait_.is_some() { &source_id } else { &id }),
"",
cx,
Expand Down

0 comments on commit 719d7a5

Please sign in to comment.