diff --git a/src/librustdoc/clean.rs b/src/librustdoc/clean.rs index 77b835b232d..94ccd3ac40e 100644 --- a/src/librustdoc/clean.rs +++ b/src/librustdoc/clean.rs @@ -1571,6 +1571,9 @@ fn try_inline(id: ast::NodeId) -> Option> { ret.extend(build_impls(tcx, did).move_iter()); build_type(tcx, did) } + // Assume that the enum type is reexported next to the variant, and + // variants don't show up in documentation specially. + ast::DefVariant(..) => return Some(Vec::new()), _ => return None, }; let fqn = csearch::get_item_path(tcx, did);