diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-02-14 00:07:48 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2015-02-18 08:19:21 +1100 |
| commit | 35ca50bd5676db31a8074a216d1aadad7d434de8 (patch) | |
| tree | 949d415d2f7a9d62c2406fa16cb202df5f0e0ab0 | |
| parent | d7b5bc3c2f673ac3edd818cb7bd42555c2cbc2a2 (diff) | |
| download | rust-35ca50bd5676db31a8074a216d1aadad7d434de8.tar.gz rust-35ca50bd5676db31a8074a216d1aadad7d434de8.zip | |
Add Send implementations for `&` and `&mut`.
Per RFC 458. Closes #22251.
| -rw-r--r-- | src/libcore/marker.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index f5b42b3c858..7e8472b91dc 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -434,3 +434,11 @@ pub struct NoCopy; #[lang="managed_bound"] #[derive(Clone, PartialEq, Eq, PartialOrd, Ord)] pub struct Managed; + +#[cfg(not(stage0))] // SNAP ac134f7 remove this attribute after the next snapshot +mod impls { + use super::{Send, Sync, Sized}; + + unsafe impl<'a, T: Sync + ?Sized> Send for &'a T {} + unsafe impl<'a, T: Send + ?Sized> Send for &'a mut T {} +} |
