Make untracked.source_span lockable so that resolution can still write to it when using TyCtxt
This commit is contained in:
parent
ade3dceb38
commit
6924e3c374
6 changed files with 12 additions and 12 deletions
|
@ -1026,7 +1026,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
/// system if the result is otherwise tracked through queries
|
||||
#[inline]
|
||||
pub fn source_span_untracked(self, def_id: LocalDefId) -> Span {
|
||||
self.untracked.source_span.get(def_id).copied().unwrap_or(DUMMY_SP)
|
||||
self.untracked.source_span.read().get(def_id).copied().unwrap_or(DUMMY_SP)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -2518,5 +2518,5 @@ pub fn provide(providers: &mut ty::query::Providers) {
|
|||
tcx.lang_items().panic_impl().map_or(false, |did| did.is_local())
|
||||
};
|
||||
providers.source_span =
|
||||
|tcx, def_id| tcx.untracked.source_span.get(def_id).copied().unwrap_or(DUMMY_SP);
|
||||
|tcx, def_id| tcx.untracked.source_span.read().get(def_id).copied().unwrap_or(DUMMY_SP);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue