We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1364a6 commit 8500fb9Copy full SHA for 8500fb9
src/librustc_data_structures/indexed_vec.rs
@@ -330,6 +330,10 @@ pub struct IndexVec<I: Idx, T> {
330
_marker: PhantomData<Fn(&I)>
331
}
332
333
+// Whether `IndexVec` is `Send` depends only on the data,
334
+// not the phantom data.
335
+unsafe impl<I: Idx, T> Send for IndexVec<I, T> where T: Send {}
336
+
337
impl<I: Idx, T: serialize::Encodable> serialize::Encodable for IndexVec<I, T> {
338
fn encode<S: serialize::Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
339
serialize::Encodable::encode(&self.raw, s)
0 commit comments