File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ impl<T: ?Sized> !Send for *const T {}
44
44
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
45
45
impl < T : ?Sized > !Send for * mut T { }
46
46
47
+ // Most instances arise automatically, but this instance is needed to link up `T: Sync` with
48
+ // `&T: Send` (and it also removes the unsound default instance `T Send` -> `&T: Send` that would
49
+ // otherwise exist).
50
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
51
+ unsafe impl < T : Sync + ?Sized > Send for & T { }
52
+
47
53
/// Types with a constant size known at compile time.
48
54
///
49
55
/// All type parameters have an implicit bound of `Sized`. The special syntax
@@ -680,13 +686,6 @@ pub struct PhantomData<T: ?Sized>;
680
686
681
687
impls ! { PhantomData }
682
688
683
- mod impls {
684
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
685
- unsafe impl < T : Sync + ?Sized > Send for & T { }
686
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
687
- unsafe impl < T : Send + ?Sized > Send for & mut T { }
688
- }
689
-
690
689
/// Compiler-internal trait used to indicate the type of enum discriminants.
691
690
///
692
691
/// This trait is automatically implemented for every type and does not add any
You can’t perform that action at this time.
0 commit comments