Skip to content

Commit ca64815

Browse files
committed
Revert "rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync""
This reverts commit 8eba29a.
1 parent 30f168e commit ca64815

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: compiler/rustc_middle/src/ty/context.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,9 @@ pub struct TyCtxt<'tcx> {
13271327
gcx: &'tcx GlobalCtxt<'tcx>,
13281328
}
13291329

1330+
// Explicitly implement `DynSync` and `DynSend` for `TyCtxt` to short circuit trait resolution.
1331+
unsafe impl DynSend for TyCtxt<'_> {}
1332+
unsafe impl DynSync for TyCtxt<'_> {}
13301333
fn _assert_tcx_fields() {
13311334
sync::assert_dyn_sync::<&'_ GlobalCtxt<'_>>();
13321335
sync::assert_dyn_send::<&'_ GlobalCtxt<'_>>();

0 commit comments

Comments
 (0)