diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-04-20 12:47:19 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-06-01 14:57:08 +0200 |
| commit | c6dbb14097c46d1438058ffd9d7838cb906f19fb (patch) | |
| tree | 3a25851659c0eab8c29bdf4e14516c205576b864 | |
| parent | d402d2d0d4c0f8cbccf52c119666b143adcc35b3 (diff) | |
| download | rust-c6dbb14097c46d1438058ffd9d7838cb906f19fb.tar.gz rust-c6dbb14097c46d1438058ffd9d7838cb906f19fb.zip | |
Assert that GlobalCtxt is Sync
| -rw-r--r-- | src/librustc/ty/context.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 27cc9514e65..35b2ce50da7 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -58,7 +58,7 @@ use rustc_data_structures::stable_hasher::{HashStable, hash_stable_hashmap, StableVec}; use arena::{TypedArena, SyncDroplessArena}; use rustc_data_structures::indexed_vec::IndexVec; -use rustc_data_structures::sync::{Lrc, Lock, WorkerLocal}; +use rustc_data_structures::sync::{self, Lrc, Lock, WorkerLocal}; use std::any::Any; use std::borrow::Borrow; use std::cmp::Ordering; @@ -1179,6 +1179,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { output_filenames: Arc::new(output_filenames.clone()), }; + sync::assert_send_val(&gcx); + tls::enter_global(gcx, f) } |
