Skip to content

Commit 20f759f

Browse files
committed
Fix rustdoc
1 parent 6e5e354 commit 20f759f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2897,7 +2897,14 @@ impl Clean<Type> for hir::Ty {
28972897
}
28982898
}
28992899
TyBareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
2900-
TyImplTraitExistential(ref exist_ty, _, _) => ImplTrait(exist_ty.bounds.clean(cx)),
2900+
TyImplTraitExistential(hir_id, _, _) => {
2901+
match cx.tcx.hir.expect_item(hir_id.id).node {
2902+
hir::ItemExistential(ref exist_ty) => {
2903+
ImplTrait(exist_ty.bounds.clean(cx))
2904+
},
2905+
ref other => panic!("impl Trait pointed to {:#?}", other),
2906+
}
2907+
},
29012908
TyInfer | TyErr => Infer,
29022909
TyTypeof(..) => panic!("Unimplemented type {:?}", self.node),
29032910
}

src/librustdoc/visit_ast.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,9 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
559559
om.impls.push(i);
560560
}
561561
},
562+
hir::ItemExistential(_) => {
563+
// FIXME(oli-obk): actually generate docs for real existential items
564+
}
562565
}
563566
}
564567

0 commit comments

Comments
 (0)