1
Fork 0

Move the untracked cstore and source_span into a struct

This commit is contained in:
Oli Scherer 2022-12-07 14:31:50 +00:00
parent 2cd36f2c89
commit 1c1d3570ee
16 changed files with 78 additions and 91 deletions

View file

@ -141,8 +141,6 @@ pub fn provide(providers: &mut Providers) {
providers.hir_attrs = |tcx, id| {
tcx.hir_crate(()).owners[id.def_id].as_owner().map_or(AttributeMap::EMPTY, |o| &o.attrs)
};
providers.source_span =
|tcx, def_id| tcx.resolutions(()).source_span.get(def_id).copied().unwrap_or(DUMMY_SP);
providers.def_span = |tcx, def_id| {
let def_id = def_id.expect_local();
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);