未验证 提交 7286be15 编写于 作者: Y Yuki Okushi 提交者: GitHub

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
...@@ -1837,19 +1837,6 @@ fn clean(&self, cx: &DocContext<'_>) -> VariantStruct { ...@@ -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 { impl Clean<Item> for ty::VariantDef {
fn clean(&self, cx: &DocContext<'_>) -> Item { fn clean(&self, cx: &DocContext<'_>) -> Item {
let kind = match self.ctor_kind { let kind = match self.ctor_kind {
......
...@@ -48,12 +48,6 @@ impl Module<'hir> { ...@@ -48,12 +48,6 @@ impl Module<'hir> {
Unit, Unit,
} }
crate struct Variant<'hir> {
crate name: Symbol,
crate id: hir::HirId,
crate def: &'hir hir::VariantData<'hir>,
}
#[derive(Debug)] #[derive(Debug)]
crate struct Import<'hir> { crate struct Import<'hir> {
crate name: Symbol, crate name: Symbol,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册