Skip to content

Commit 8eba29a

Browse files
committed
rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync"
We don't need to "short circuit trait resolution", because DynSend and DynSync are auto traits and thus coinductive
1 parent a9e7b30 commit 8eba29a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

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

-3
Original file line numberDiff line numberDiff line change
@@ -1290,9 +1290,6 @@ pub struct TyCtxt<'tcx> {
12901290
gcx: &'tcx GlobalCtxt<'tcx>,
12911291
}
12921292

1293-
// Explicitly implement `DynSync` and `DynSend` for `TyCtxt` to short circuit trait resolution.
1294-
unsafe impl DynSend for TyCtxt<'_> {}
1295-
unsafe impl DynSync for TyCtxt<'_> {}
12961293
fn _assert_tcx_fields() {
12971294
sync::assert_dyn_sync::<&'_ GlobalCtxt<'_>>();
12981295
sync::assert_dyn_send::<&'_ GlobalCtxt<'_>>();

0 commit comments

Comments
 (0)