1
Fork 0

expand comments of TyCtxt impl of DynSync/DynSend

so that it doesn't get removed again
This commit is contained in:
Rémy Rakic 2025-03-06 09:21:37 +00:00
parent ca64815c70
commit 7d6bbe2df7

View file

@ -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() {