diff options
| author | bors <bors@rust-lang.org> | 2017-12-16 03:54:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-12-16 03:54:10 +0000 |
| commit | b3392f8ae4074de4de15befee871ad8b1523a2ed (patch) | |
| tree | ca7b368ddf3b6c47faafec93910a1a0e322dffbc /src/librustc_data_structures | |
| parent | 39cb4c60575b371f6c8d473160ae6dfea4bb83e5 (diff) | |
| parent | a0fb93ddb4eb5fe1fe59ae10c14795b893ba786a (diff) | |
| download | rust-b3392f8ae4074de4de15befee871ad8b1523a2ed.tar.gz rust-b3392f8ae4074de4de15befee871ad8b1523a2ed.zip | |
Auto merge of #46560 - Yoric:incr, r=michaelwoerister
Loading the dependency graph in the background Patch is a bit longer than I expected, due to the fact that most of this code relies upon a `Session` value, which is not `Sync`.
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/indexed_vec.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs index e2f50c8c889..19528a14038 100644 --- a/src/librustc_data_structures/indexed_vec.rs +++ b/src/librustc_data_structures/indexed_vec.rs @@ -330,6 +330,10 @@ pub struct IndexVec<I: Idx, T> { _marker: PhantomData<Fn(&I)> } +// Whether `IndexVec` is `Send` depends only on the data, +// not the phantom data. +unsafe impl<I: Idx, T> Send for IndexVec<I, T> where T: Send {} + impl<I: Idx, T: serialize::Encodable> serialize::Encodable for IndexVec<I, T> { fn encode<S: serialize::Encoder>(&self, s: &mut S) -> Result<(), S::Error> { serialize::Encodable::encode(&self.raw, s) |
