Skip to content

Commit 7286be1

Browse files
authored
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
2 parents ce06df2 + c54678a commit 7286be1

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/librustdoc/clean/mod.rs

-13
Original file line numberDiff line numberDiff line change
@@ -1837,19 +1837,6 @@ impl Clean<VariantStruct> for rustc_hir::VariantData<'_> {
18371837
}
18381838
}
18391839

1840-
impl Clean<Item> for doctree::Variant<'_> {
1841-
fn clean(&self, cx: &DocContext<'_>) -> Item {
1842-
let what_rustc_thinks = Item::from_hir_id_and_parts(
1843-
self.id,
1844-
Some(self.name),
1845-
VariantItem(Variant { kind: self.def.clean(cx) }),
1846-
cx,
1847-
);
1848-
// don't show `pub` for variants, which are always public
1849-
Item { visibility: Inherited, ..what_rustc_thinks }
1850-
}
1851-
}
1852-
18531840
impl Clean<Item> for ty::VariantDef {
18541841
fn clean(&self, cx: &DocContext<'_>) -> Item {
18551842
let kind = match self.ctor_kind {

src/librustdoc/doctree.rs

-6
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ crate enum StructType {
4848
Unit,
4949
}
5050

51-
crate struct Variant<'hir> {
52-
crate name: Symbol,
53-
crate id: hir::HirId,
54-
crate def: &'hir hir::VariantData<'hir>,
55-
}
56-
5751
#[derive(Debug)]
5852
crate struct Import<'hir> {
5953
crate name: Symbol,

0 commit comments

Comments
 (0)