pull local types from the HIR instead of tcx
This commit is contained in:
parent
bfd2b34454
commit
978c13aa02
1 changed files with 10 additions and 1 deletions
|
@ -315,7 +315,16 @@ pub fn build_impl(cx: &DocContext, did: DefId, ret: &mut Vec<clean::Item>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let for_ = tcx.type_of(did).clean(cx);
|
let for_ = if let Some(nodeid) = tcx.hir.as_local_node_id(did) {
|
||||||
|
match tcx.hir.expect_item(nodeid).node {
|
||||||
|
hir::ItemKind::Impl(.., ref t, _) => {
|
||||||
|
t.clean(cx)
|
||||||
|
}
|
||||||
|
_ => panic!("did given to build_impl was not an impl"),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tcx.type_of(did).clean(cx)
|
||||||
|
};
|
||||||
|
|
||||||
// Only inline impl if the implementing type is
|
// Only inline impl if the implementing type is
|
||||||
// reachable in rustdoc generated documentation
|
// reachable in rustdoc generated documentation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue