Rollup merge of #81023 - CraftSpider:rustdoc-remove-variant, r=jyn514

Remove doctree::Variant

This was easy, probably was missed when whatever used it was removed
This commit is contained in:
Yuki Okushi 2021-01-15 18:26:18 +09:00 committed by GitHub
commit 7286be15fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 19 deletions

View File

@ -1837,19 +1837,6 @@ fn clean(&self, cx: &DocContext<'_>) -> VariantStruct {
}
}
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 {

View File

@ -48,12 +48,6 @@ impl Module<'hir> {
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,