Skip to content

Commit

Permalink
Rollup merge of #81023 - CraftSpider:rustdoc-remove-variant, r=jyn514
Browse files Browse the repository at this point in the history
Remove doctree::Variant

This was easy, probably was missed when whatever used it was removed
  • Loading branch information
JohnTitor authored Jan 15, 2021
2 parents ce06df2 + c54678a commit 7286be1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
13 changes: 0 additions & 13 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1837,19 +1837,6 @@ impl Clean<VariantStruct> for rustc_hir::VariantData<'_> {
}
}

impl Clean<Item> for doctree::Variant<'_> {
fn clean(&self, cx: &DocContext<'_>) -> Item {
let what_rustc_thinks = Item::from_hir_id_and_parts(
self.id,
Some(self.name),
VariantItem(Variant { kind: self.def.clean(cx) }),
cx,
);
// don't show `pub` for variants, which are always public
Item { visibility: Inherited, ..what_rustc_thinks }
}
}

impl Clean<Item> for ty::VariantDef {
fn clean(&self, cx: &DocContext<'_>) -> Item {
let kind = match self.ctor_kind {
Expand Down
6 changes: 0 additions & 6 deletions src/librustdoc/doctree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ crate enum StructType {
Unit,
}

crate struct Variant<'hir> {
crate name: Symbol,
crate id: hir::HirId,
crate def: &'hir hir::VariantData<'hir>,
}

#[derive(Debug)]
crate struct Import<'hir> {
crate name: Symbol,
Expand Down

0 comments on commit 7286be1

Please sign in to comment.