Skip to content

Commit 0d7c146

Browse files
committed
TraitAlias
1 parent d0302f6 commit 0d7c146

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ impl Clean<Vec<Item>> for hir::Item<'_> {
309309
is_auto: is_auto.clean(cx),
310310
}))
311311
}
312+
ItemKind::TraitAlias(ref generics, bounds) => NotInlined(TraitAliasItem(TraitAlias {
313+
generics: generics.clean(cx),
314+
bounds: bounds.clean(cx),
315+
})),
312316
_ => unimplemented!(),
313317
};
314318

@@ -1142,20 +1146,6 @@ impl Clean<FnRetTy> for hir::FnRetTy<'_> {
11421146
}
11431147
}
11441148

1145-
impl Clean<Item> for doctree::TraitAlias<'_> {
1146-
fn clean(&self, cx: &DocContext<'_>) -> Item {
1147-
Item::from_hir_id_and_parts(
1148-
self.id,
1149-
Some(self.name),
1150-
TraitAliasItem(TraitAlias {
1151-
generics: self.generics.clean(cx),
1152-
bounds: self.bounds.clean(cx),
1153-
}),
1154-
cx,
1155-
)
1156-
}
1157-
}
1158-
11591149
impl Clean<bool> for hir::IsAuto {
11601150
fn clean(&self, _: &DocContext<'_>) -> bool {
11611151
match *self {

src/librustdoc/doctree.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ crate struct Static<'hir> {
3030
crate span: Span,
3131
}
3232

33-
crate struct TraitAlias<'hir> {
34-
crate name: Symbol,
35-
crate generics: &'hir hir::Generics<'hir>,
36-
crate bounds: &'hir [hir::GenericBound<'hir>],
37-
crate id: hir::HirId,
38-
}
39-
4033
#[derive(Debug)]
4134
crate struct Impl<'hir> {
4235
crate unsafety: hir::Unsafety,

0 commit comments

Comments
 (0)