diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-04-01 08:19:26 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-04-10 14:40:25 +0200 |
| commit | 753cd9a12c64bf504ae2bfdc3a676a28d8076793 (patch) | |
| tree | 1e8a1fa06152dee51acfc0e1f6e58e6dcc42af72 | |
| parent | e82b6c42b47ef9cadf2d86395fde3a3d9d5ff628 (diff) | |
| download | rust-753cd9a12c64bf504ae2bfdc3a676a28d8076793.tar.gz rust-753cd9a12c64bf504ae2bfdc3a676a28d8076793.zip | |
Make sure Session.incr_comp_session is only used on one thread
| -rw-r--r-- | src/librustc/session/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 8d3215e69cd..80e91db15ed 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -127,7 +127,7 @@ pub struct Session { /// macro name and definition span in the source crate. pub imported_macro_spans: RefCell<HashMap<Span, (String, Span)>>, - incr_comp_session: RefCell<IncrCompSession>, + incr_comp_session: OneThread<RefCell<IncrCompSession>>, /// A cache of attributes ignored by StableHashingContext pub ignored_attr_names: FxHashSet<Symbol>, @@ -1117,7 +1117,7 @@ pub fn build_session_( allocator_kind: Cell::new(None), injected_panic_runtime: Cell::new(None), imported_macro_spans: RefCell::new(HashMap::new()), - incr_comp_session: RefCell::new(IncrCompSession::NotInitialized), + incr_comp_session: OneThread::new(RefCell::new(IncrCompSession::NotInitialized)), ignored_attr_names: ich::compute_ignored_attr_names(), profile_channel: Lock::new(None), perf_stats: PerfStats { |
