From 16cfa5c2efb44987eafbacceeb53099ee0ef8ad6 Mon Sep 17 00:00:00 2001 From: QuietMisdreavus Date: Thu, 14 Jun 2018 16:34:32 -0500 Subject: [PATCH] rustdoc: discard struct ctors from imports --- src/librustdoc/visit_ast.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index f05cbbfd7a2..44b41439511 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -365,6 +365,11 @@ fn inherits_doc_hidden(cx: &core::DocContext, mut node: ast::NodeId) -> bool { }); true } + hir_map::NodeStructCtor(_) if !glob => { + // struct constructors always show up alongside their struct definitions, we've + // already processed that so just discard this + true + } _ => false, }; self.view_item_stack.remove(&def_node_id); -- 2.44.0