Use a lock-free datastructure for source_span

This commit is contained in:
Oli Scherer 2023-02-21 08:37:10 +00:00
parent a04e78730e
commit decfb4d123
10 changed files with 65 additions and 12 deletions

View file

@ -146,7 +146,7 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
#[inline]
fn def_span(&self, def_id: LocalDefId) -> Span {
*self.untracked.source_span.read().get(def_id).unwrap_or(&DUMMY_SP)
self.untracked.source_span.get(def_id).unwrap_or(DUMMY_SP)
}
#[inline]