Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 59645fc

Browse files
committedMar 6, 2025·
expand comments of TyCtxt impl of DynSync/DynSend
so that it doesn't get removed again
1 parent ca64815 commit 59645fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎compiler/rustc_middle/src/ty/context.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +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.
1330+
// Explicitly implement `DynSync` and `DynSend` for `TyCtxt` to short circuit trait resolution. Its
1331+
// field are asserted to implement these traits below, so this is trivially safe, and it greatly
1332+
// speeds-up compilation of this crate.
13311333
unsafe impl DynSend for TyCtxt<'_> {}
13321334
unsafe impl DynSync for TyCtxt<'_> {}
13331335
fn _assert_tcx_fields() {

0 commit comments

Comments
 (0)
Please sign in to comment.