From 35ca50bd5676db31a8074a216d1aadad7d434de8 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sat, 14 Feb 2015 00:07:48 +1100 Subject: [PATCH] Add Send implementations for `&` and `&mut`. Per RFC 458. Closes #22251. --- src/libcore/marker.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index f5b42b3c85844..7e8472b91dc24 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 {} +}