Make sure Session.imported_macro_spans is only used on one thread
This commit is contained in:
parent
271c8d362a
commit
73b26f7f51
1 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ pub struct Session {
|
||||||
/// Map from imported macro spans (which consist of
|
/// Map from imported macro spans (which consist of
|
||||||
/// the localized span for the macro body) to the
|
/// the localized span for the macro body) to the
|
||||||
/// macro name and definition span in the source crate.
|
/// macro name and definition span in the source crate.
|
||||||
pub imported_macro_spans: RefCell<HashMap<Span, (String, Span)>>,
|
pub imported_macro_spans: OneThread<RefCell<HashMap<Span, (String, Span)>>>,
|
||||||
|
|
||||||
incr_comp_session: OneThread<RefCell<IncrCompSession>>,
|
incr_comp_session: OneThread<RefCell<IncrCompSession>>,
|
||||||
|
|
||||||
|
@ -1108,7 +1108,7 @@ pub fn build_session_(
|
||||||
injected_allocator: Cell::new(None),
|
injected_allocator: Cell::new(None),
|
||||||
allocator_kind: Cell::new(None),
|
allocator_kind: Cell::new(None),
|
||||||
injected_panic_runtime: Cell::new(None),
|
injected_panic_runtime: Cell::new(None),
|
||||||
imported_macro_spans: RefCell::new(HashMap::new()),
|
imported_macro_spans: OneThread::new(RefCell::new(HashMap::new())),
|
||||||
incr_comp_session: OneThread::new(RefCell::new(IncrCompSession::NotInitialized)),
|
incr_comp_session: OneThread::new(RefCell::new(IncrCompSession::NotInitialized)),
|
||||||
ignored_attr_names: ich::compute_ignored_attr_names(),
|
ignored_attr_names: ich::compute_ignored_attr_names(),
|
||||||
profile_channel: Lock::new(None),
|
profile_channel: Lock::new(None),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue