diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs index e2f50c8c8891..19528a140382 100644 --- a/src/librustc_data_structures/indexed_vec.rs +++ b/src/librustc_data_structures/indexed_vec.rs @@ -330,6 +330,10 @@ pub struct IndexVec { _marker: PhantomData } +// Whether `IndexVec` is `Send` depends only on the data, +// not the phantom data. +unsafe impl Send for IndexVec where T: Send {} + impl serialize::Encodable for IndexVec { fn encode(&self, s: &mut S) -> Result<(), S::Error> { serialize::Encodable::encode(&self.raw, s)