hir: remove NodeId from StructField

This commit is contained in:
ljedrz
2019-02-27 15:56:59 +01:00
parent 7e277d96fe
commit ae45f170ee
10 changed files with 26 additions and 25 deletions

View File

@@ -2913,14 +2913,16 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
impl Clean<Item> for hir::StructField {
fn clean(&self, cx: &DocContext<'_, '_, '_>) -> Item {
let local_did = cx.tcx.hir().local_def_id_from_hir_id(self.hir_id);
Item {
name: Some(self.ident.name).clean(cx),
attrs: self.attrs.clean(cx),
source: self.span.clean(cx),
visibility: self.vis.clean(cx),
stability: get_stability(cx, cx.tcx.hir().local_def_id(self.id)),
deprecation: get_deprecation(cx, cx.tcx.hir().local_def_id(self.id)),
def_id: cx.tcx.hir().local_def_id(self.id),
stability: get_stability(cx, local_did),
deprecation: get_deprecation(cx, local_did),
def_id: local_did,
inner: StructFieldItem(self.ty.clean(cx)),
}
}