Skip to content

Commit

Permalink
Add Send implementations for & and &mut.
Browse files Browse the repository at this point in the history
Per RFC 458.

Closes #22251.
  • Loading branch information
huonw committed Feb 17, 2015
1 parent d7b5bc3 commit 35ca50b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libcore/marker.rs
Expand Up @@ -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 {}
}

0 comments on commit 35ca50b

Please sign in to comment.