1
Fork 0

Record tcx.def_span instead of item.span in crate metadata

This was missed in PR #75465. As a result, a few places have been using
the full body span of functions, instead of just the header span.
This commit is contained in:
Aaron Hill 2020-09-18 21:49:11 -04:00
parent 4eff9b0b29
commit e734733a9e
No known key found for this signature in database
GPG key ID: B4087E510E98B164
7 changed files with 20 additions and 42 deletions

View file

@ -1300,7 +1300,7 @@ impl EncodeContext<'a, 'tcx> {
});
record!(self.tables.visibility[def_id] <-
ty::Visibility::from_hir(&item.vis, item.hir_id, tcx));
record!(self.tables.span[def_id] <- item.span);
record!(self.tables.span[def_id] <- self.tcx.def_span(def_id));
record!(self.tables.attributes[def_id] <- item.attrs);
// FIXME(eddyb) there should be a nicer way to do this.
match item.kind {