1
Fork 0

Add Send implementations for & and &mut.

Per RFC 458.

Closes #22251.
This commit is contained in:
Huon Wilson 2015-02-14 00:07:48 +11:00
parent d7b5bc3c2f
commit 35ca50bd56

View file

@ -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 {}
}