ForeignItemKind

This commit is contained in:
csmoe 2018-07-11 22:56:44 +08:00 committed by Oliver Schneider
parent f12eca47e0
commit 7e5d224472
18 changed files with 60 additions and 61 deletions

View file

@ -4018,7 +4018,7 @@ impl Clean<Vec<Item>> for hir::ForeignMod {
impl Clean<Item> for hir::ForeignItem {
fn clean(&self, cx: &DocContext) -> Item {
let inner = match self.node {
hir::ForeignItemFn(ref decl, ref names, ref generics) => {
hir::ForeignItemKind::Fn(ref decl, ref names, ref generics) => {
let (generics, decl) = enter_impl_trait(cx, || {
(generics.clean(cx), (&**decl, &names[..]).clean(cx))
});
@ -4033,14 +4033,14 @@ impl Clean<Item> for hir::ForeignItem {
},
})
}
hir::ForeignItemStatic(ref ty, mutbl) => {
hir::ForeignItemKind::Static(ref ty, mutbl) => {
ForeignStaticItem(Static {
type_: ty.clean(cx),
mutability: if mutbl {Mutable} else {Immutable},
expr: "".to_string(),
})
}
hir::ForeignItemType => {
hir::ForeignItemKind::Type => {
ForeignTypeItem
}
};