@@ -74,10 +74,10 @@ where
74
74
O : Send + Sync + ' static ,
75
75
F : FnOnce ( & O ) -> Result < & [ u8 ] , E > ,
76
76
{
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.
78
78
//
79
79
// 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.
81
81
//
82
82
// Thus, "extending" the lifetime of the reference returned from `F` is fine.
83
83
// 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 {
137
137
}
138
138
}
139
139
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`
141
141
#[ cfg( parallel_compiler) ]
142
142
unsafe impl Send for OwnedSlice { }
143
143
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`
145
145
#[ cfg( parallel_compiler) ]
146
146
unsafe impl Sync for OwnedSlice { }
147
147
0 commit comments