about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2025-03-06 09:21:37 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2025-03-06 11:20:25 +0000
commit7d6bbe2df788d9c23aef1384bc1c8b240253ae7b (patch)
tree619469b689745220f7c94e844b2fd7dc5834758e
parentca64815c702162c7c36f165f07462ce32b14d68a (diff)
downloadrust-7d6bbe2df788d9c23aef1384bc1c8b240253ae7b.tar.gz
rust-7d6bbe2df788d9c23aef1384bc1c8b240253ae7b.zip
expand comments of `TyCtxt` impl of `DynSync`/`DynSend`
so that it doesn't get removed again
-rw-r--r--compiler/rustc_middle/src/ty/context.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 2d2bbd22b98..4013f7b2c85 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -1327,7 +1327,9 @@ pub struct TyCtxt<'tcx> {
     gcx: &'tcx GlobalCtxt<'tcx>,
 }
 
-// Explicitly implement `DynSync` and `DynSend` for `TyCtxt` to short circuit trait resolution.
+// Explicitly implement `DynSync` and `DynSend` for `TyCtxt` to short circuit trait resolution. Its
+// field are asserted to implement these traits below, so this is trivially safe, and it greatly
+// speeds-up compilation of this crate and its dependents.
 unsafe impl DynSend for TyCtxt<'_> {}
 unsafe impl DynSync for TyCtxt<'_> {}
 fn _assert_tcx_fields() {