diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-04-01 08:27:46 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-04-10 14:40:26 +0200 |
| commit | 006f9b2f5616ad970cb0f5102ec50e02ef2dd379 (patch) | |
| tree | 90965ebb939774a823c1646bb1d3ec9de3e829a7 /src/librustc/session | |
| parent | dacf9ba00fb8d6b7202a1ed5f06febe3fd2cf9b4 (diff) | |
| download | rust-006f9b2f5616ad970cb0f5102ec50e02ef2dd379.tar.gz rust-006f9b2f5616ad970cb0f5102ec50e02ef2dd379.zip | |
Make Session.injected_panic_runtime thread-safe
Diffstat (limited to 'src/librustc/session')
| -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 a92a2c916b2..8f2043fdfc6 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -120,7 +120,7 @@ pub struct Session { /// injected. pub injected_allocator: Once<Option<CrateNum>>, pub allocator_kind: Once<Option<AllocatorKind>>, - pub injected_panic_runtime: Cell<Option<CrateNum>>, + pub injected_panic_runtime: Once<Option<CrateNum>>, /// Map from imported macro spans (which consist of /// the localized span for the macro body) to the @@ -1107,7 +1107,7 @@ pub fn build_session_( next_node_id: OneThread::new(Cell::new(NodeId::new(1))), injected_allocator: Once::new(), allocator_kind: Once::new(), - injected_panic_runtime: Cell::new(None), + injected_panic_runtime: Once::new(), imported_macro_spans: OneThread::new(RefCell::new(HashMap::new())), incr_comp_session: OneThread::new(RefCell::new(IncrCompSession::NotInitialized)), ignored_attr_names: ich::compute_ignored_attr_names(), |
