]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: Don't show reexported enum variants
authorAlex Crichton <alex@alexcrichton.com>
Fri, 23 May 2014 23:16:35 +0000 (16:16 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 25 May 2014 08:17:57 +0000 (01:17 -0700)
For now just assume that the enum type itself is reexported.

src/librustdoc/clean.rs

index 77b835b232d9c8dc90b9439eb8ed90afb6f1ee67..94ccd3ac40ea7b6ec56870e72ebfe8bf604666c9 100644 (file)
@@ -1571,6 +1571,9 @@ fn try_inline(id: ast::NodeId) -> Option<Vec<Item>> {
             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);