From 31f5de610f18757faae9af722255f6212cbb953c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 29 May 2014 15:52:03 -0700 Subject: [PATCH] rustdoc: Don't inline tuple struct constructors These don't actually point to anything, so there's no need to inline them. --- src/librustdoc/clean/inline.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index 0c2714355dc..65c60f2d360 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -62,6 +62,11 @@ fn try_inline_def(cx: &core::DocContext, clean::TraitItem(build_external_trait(tcx, did)) } ast::DefFn(did, style) => { + // If this function is a tuple struct constructor, we just skip it + if csearch::get_tuple_struct_definition_if_ctor(&tcx.sess.cstore, + did).is_some() { + return None + } record_extern_fqn(cx, did, clean::TypeFunction); clean::FunctionItem(build_external_function(tcx, did, style)) } -- 2.44.0