]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: discard struct ctors from imports
authorQuietMisdreavus <grey@quietmisdreavus.net>
Thu, 14 Jun 2018 21:34:32 +0000 (16:34 -0500)
committerQuietMisdreavus <grey@quietmisdreavus.net>
Thu, 14 Jun 2018 22:47:35 +0000 (17:47 -0500)
src/librustdoc/visit_ast.rs

index f05cbbfd7a2b6e77be8f5bb32c03ccc5aecd9baf..44b41439511f7eac6ff9fbd22dd239771894592e 100644 (file)
@@ -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);