Track span dependency using a callback.
This commit is contained in:
@@ -153,6 +153,7 @@ pub fn provide(providers: &mut Providers) {
|
||||
index.parenting.get(&id).copied().unwrap_or(CRATE_HIR_ID)
|
||||
};
|
||||
providers.hir_attrs = |tcx, id| AttributeMap { map: &tcx.untracked_crate.attrs, prefix: id };
|
||||
providers.source_span = |tcx, def_id| tcx.resolutions(()).definitions.def_span(def_id);
|
||||
providers.def_span = |tcx, def_id| tcx.hir().span_if_local(def_id).unwrap_or(DUMMY_SP);
|
||||
providers.fn_arg_names = |tcx, id| {
|
||||
let hir = tcx.hir();
|
||||
|
||||
Reference in New Issue
Block a user