Skip to content

Commit 59645fc

Browse files
committed
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

+3-1
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)