1
Fork 0

Fix rustdoc

This commit is contained in:
Oliver Schneider 2018-06-08 11:09:05 +02:00
parent 6e5e35458c
commit 20f759fdce
2 changed files with 11 additions and 1 deletions

View file

@ -2897,7 +2897,14 @@ impl Clean<Type> for hir::Ty {
}
}
TyBareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
TyImplTraitExistential(ref exist_ty, _, _) => ImplTrait(exist_ty.bounds.clean(cx)),
TyImplTraitExistential(hir_id, _, _) => {
match cx.tcx.hir.expect_item(hir_id.id).node {
hir::ItemExistential(ref exist_ty) => {
ImplTrait(exist_ty.bounds.clean(cx))
},
ref other => panic!("impl Trait pointed to {:#?}", other),
}
},
TyInfer | TyErr => Infer,
TyTypeof(..) => panic!("Unimplemented type {:?}", self.node),
}

View file

@ -559,6 +559,9 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
om.impls.push(i);
}
},
hir::ItemExistential(_) => {
// FIXME(oli-obk): actually generate docs for real existential items
}
}
}