Skip to content

Commit 35ca50b

Browse files
committed
Add Send implementations for & and &mut.
Per RFC 458. Closes #22251.
1 parent d7b5bc3 commit 35ca50b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libcore/marker.rs

+8
Original file line numberDiff line numberDiff line change
@@ -434,3 +434,11 @@ pub struct NoCopy;
434434
#[lang="managed_bound"]
435435
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
436436
pub struct Managed;
437+
438+
#[cfg(not(stage0))] // SNAP ac134f7 remove this attribute after the next snapshot
439+
mod impls {
440+
use super::{Send, Sync, Sized};
441+
442+
unsafe impl<'a, T: Sync + ?Sized> Send for &'a T {}
443+
unsafe impl<'a, T: Send + ?Sized> Send for &'a mut T {}
444+
}

0 commit comments

Comments
 (0)