Skip to content

Commit f4e3896

Browse files
committed
OpaqueTy
1 parent 1589dda commit f4e3896

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ impl Clean<Vec<Item>> for hir::Item<'_> {
271271
false,
272272
))
273273
}
274+
ItemKind::OpaqueTy(ref ty) => NotInlined(OpaqueTyItem(OpaqueTy {
275+
bounds: ty.bounds.clean(cx),
276+
generics: ty.generics.clean(cx),
277+
})),
274278
ItemKind::Union(ref variant_data, ref generics) => NotInlined(UnionItem(Union {
275279
struct_type: doctree::struct_type_from_def(&variant_data),
276280
generics: generics.clean(cx),
@@ -2075,20 +2079,6 @@ impl Clean<String> for Symbol {
20752079
}
20762080
}
20772081

2078-
impl Clean<Item> for doctree::OpaqueTy<'_> {
2079-
fn clean(&self, cx: &DocContext<'_>) -> Item {
2080-
Item::from_hir_id_and_parts(
2081-
self.id,
2082-
Some(self.name),
2083-
OpaqueTyItem(OpaqueTy {
2084-
bounds: self.opaque_ty.bounds.clean(cx),
2085-
generics: self.opaque_ty.generics.clean(cx),
2086-
}),
2087-
cx,
2088-
)
2089-
}
2090-
}
2091-
20922082
impl Clean<BareFunctionDecl> for hir::BareFnTy<'_> {
20932083
fn clean(&self, cx: &DocContext<'_>) -> BareFunctionDecl {
20942084
let (generic_params, decl) = enter_impl_trait(cx, || {

src/librustdoc/doctree.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ crate struct Variant<'hir> {
3939
crate def: &'hir hir::VariantData<'hir>,
4040
}
4141

42-
crate struct OpaqueTy<'hir> {
43-
crate opaque_ty: &'hir hir::OpaqueTy<'hir>,
44-
crate name: Symbol,
45-
crate id: hir::HirId,
46-
}
47-
4842
#[derive(Debug)]
4943
crate struct Static<'hir> {
5044
crate type_: &'hir hir::Ty<'hir>,

0 commit comments

Comments
 (0)