diff options
Diffstat (limited to 'src/librustdoc/clean/inline.rs')
| -rw-r--r-- | src/librustdoc/clean/inline.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index 30b478f486e..7784fc70a1e 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -76,22 +76,23 @@ fn try_inline_def(cx: &DocContext, tcx: &ty::ctxt, record_extern_fqn(cx, did, clean::TypeTrait); clean::TraitItem(build_external_trait(cx, tcx, did)) } - def::DefFn(did, false) => { - // If this function is a tuple struct constructor, we just skip it + def::DefFn(did) => { record_extern_fqn(cx, did, clean::TypeFunction); clean::FunctionItem(build_external_function(cx, tcx, did)) } - def::DefStruct(did) => { + def::DefStruct(did) + // If this is a struct constructor, we skip it + if tcx.sess.cstore.tuple_struct_definition_if_ctor(did).is_none() => { record_extern_fqn(cx, did, clean::TypeStruct); ret.extend(build_impls(cx, tcx, did)); clean::StructItem(build_struct(cx, tcx, did)) } - def::DefTy(did, false) => { + def::DefTyAlias(did) => { record_extern_fqn(cx, did, clean::TypeTypedef); ret.extend(build_impls(cx, tcx, did)); build_type(cx, tcx, did) } - def::DefTy(did, true) => { + def::DefEnum(did) => { record_extern_fqn(cx, did, clean::TypeEnum); ret.extend(build_impls(cx, tcx, did)); build_type(cx, tcx, did) |
