about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAskar Safin <safinaskar@mail.ru>2025-02-08 07:23:11 +0300
committerAskar Safin <safinaskar@mail.ru>2025-02-08 07:40:52 +0300
commit8eba29ac1015e989e6ba96ff17a75d548afde7ff (patch)
tree3d81fdbd48f8d3d5a3e542b79f6527e3bb74968f
parenta9e7b30487235621751cc628f170c0f15fb215c4 (diff)
downloadrust-8eba29ac1015e989e6ba96ff17a75d548afde7ff.tar.gz
rust-8eba29ac1015e989e6ba96ff17a75d548afde7ff.zip
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
-rw-r--r--compiler/rustc_middle/src/ty/context.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index c6fc5f98f56..3cd66d4f190 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -1290,9 +1290,6 @@ pub struct TyCtxt<'tcx> {
     gcx: &'tcx GlobalCtxt<'tcx>,
 }
 
-// Explicitly implement `DynSync` and `DynSend` for `TyCtxt` to short circuit trait resolution.
-unsafe impl DynSend for TyCtxt<'_> {}
-unsafe impl DynSync for TyCtxt<'_> {}
 fn _assert_tcx_fields() {
     sync::assert_dyn_sync::<&'_ GlobalCtxt<'_>>();
     sync::assert_dyn_send::<&'_ GlobalCtxt<'_>>();