Skip to content

Commit c6dbb14

Browse files
committed
Assert that GlobalCtxt is Sync
1 parent d402d2d commit c6dbb14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc/ty/context.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ use rustc_data_structures::stable_hasher::{HashStable, hash_stable_hashmap,
5858
StableVec};
5959
use arena::{TypedArena, SyncDroplessArena};
6060
use rustc_data_structures::indexed_vec::IndexVec;
61-
use rustc_data_structures::sync::{Lrc, Lock, WorkerLocal};
61+
use rustc_data_structures::sync::{self, Lrc, Lock, WorkerLocal};
6262
use std::any::Any;
6363
use std::borrow::Borrow;
6464
use std::cmp::Ordering;
@@ -1179,6 +1179,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
11791179
output_filenames: Arc::new(output_filenames.clone()),
11801180
};
11811181

1182+
sync::assert_send_val(&gcx);
1183+
11821184
tls::enter_global(gcx, f)
11831185
}
11841186

0 commit comments

Comments
 (0)