@@ -74,10 +74,10 @@ where
7474 O : Send + Sync + ' static ,
7575 F : FnOnce ( & O ) -> Result < & [ u8 ] , E > ,
7676{
77- // We box the owner of the bytes, so it doesn't move.
77+ // We wrap the owner of the bytes in , so it doesn't move.
7878 //
7979 // Since the owner does not move and we don't access it in any way
80- // before drop , there is nothing that can invalidate the bytes pointer.
80+ // before dropping , there is nothing that can invalidate the bytes pointer.
8181 //
8282 // Thus, "extending" the lifetime of the reference returned from `F` is fine.
8383 // We pretend that we pass it a reference that lives as long as the returned slice.
@@ -137,11 +137,11 @@ impl Borrow<[u8]> for OwnedSlice {
137137 }
138138}
139139
140- // Safety: `OwnedSlice` is conceptually `(&'self.1 [u8], Box <dyn Send + Sync>)`, which is `Send`
140+ // Safety: `OwnedSlice` is conceptually `(&'self.1 [u8], Arc <dyn Send + Sync>)`, which is `Send`
141141#[ cfg( parallel_compiler) ]
142142unsafe impl Send for OwnedSlice { }
143143
144- // Safety: `OwnedSlice` is conceptually `(&'self.1 [u8], Box <dyn Send + Sync>)`, which is `Sync`
144+ // Safety: `OwnedSlice` is conceptually `(&'self.1 [u8], Arc <dyn Send + Sync>)`, which is `Sync`
145145#[ cfg( parallel_compiler) ]
146146unsafe impl Sync for OwnedSlice { }
147147
0 commit comments