From f522d882373067ab79ea0fdc30be6150eeccb1fd Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 29 Feb 2016 22:03:23 -0500 Subject: Explicitly opt out of `Sync` for `cell` and `mpsc` types These types were already `!Sync`, but this improves error messages when they are used in contexts that require `Sync`, aligning them with conventions used with `Rc`, among others. --- src/libcore/cell.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libcore') diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 255c846244b..144adde12e4 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -241,6 +241,9 @@ impl Cell { #[stable(feature = "rust1", since = "1.0.0")] unsafe impl Send for Cell where T: Send {} +#[stable(feature = "rust1", since = "1.0.0")] +impl !Sync for Cell {} + #[stable(feature = "rust1", since = "1.0.0")] impl Clone for Cell { #[inline] @@ -461,6 +464,9 @@ impl RefCell { #[stable(feature = "rust1", since = "1.0.0")] unsafe impl Send for RefCell where T: Send {} +#[stable(feature = "rust1", since = "1.0.0")] +impl !Sync for RefCell {} + #[stable(feature = "rust1", since = "1.0.0")] impl Clone for RefCell { #[inline] -- cgit 1.4.1-3-g733a5