expand comments of TyCtxt
impl of DynSync
/DynSend
so that it doesn't get removed again
This commit is contained in:
parent
ca64815c70
commit
7d6bbe2df7
1 changed files with 3 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue