Do the hard part first

The only bit failing was the module, so change that before removing the
`span` field.
This commit is contained in:
Joshua Nelson 2021-03-24 00:52:52 -04:00
parent a4b6214279
commit b412b46cf7
9 changed files with 33 additions and 20 deletions

View file

@ -40,7 +40,8 @@ impl JsonRenderer<'_> {
.iter()
.map(rustc_ast_pretty::pprust::attribute_to_string)
.collect();
let clean::Item { span, name, attrs: _, kind: _, visibility, def_id } = item;
let span = item.span();
let clean::Item { name, attrs: _, kind: _, span: _, visibility, def_id } = item;
let inner = match *item.kind {
clean::StrippedItem(_) => return None,
_ => from_clean_item(item, self.tcx),