diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-08-05 16:40:04 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-08-07 08:54:38 -0700 |
| commit | 1f760d5d1a448c08ff4b66cfa8d35d39a5d667c0 (patch) | |
| tree | 9befa0d5628cafad50e44dbc28e494dbf3b45487 /src/libsync/comm | |
| parent | b09a02b41588b2348fcce89c37c4a2cdc614d350 (diff) | |
| download | rust-1f760d5d1a448c08ff4b66cfa8d35d39a5d667c0.tar.gz rust-1f760d5d1a448c08ff4b66cfa8d35d39a5d667c0.zip | |
Rename `Share` to `Sync`
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
Diffstat (limited to 'src/libsync/comm')
| -rw-r--r-- | src/libsync/comm/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsync/comm/mod.rs b/src/libsync/comm/mod.rs index eff4cea1c43..45016b97566 100644 --- a/src/libsync/comm/mod.rs +++ b/src/libsync/comm/mod.rs @@ -375,7 +375,7 @@ pub struct Receiver<T> { inner: UnsafeCell<Flavor<T>>, receives: Cell<uint>, // can't share in an arc - marker: marker::NoShare, + marker: marker::NoSync, } /// An iterator over messages on a receiver, this iterator will block @@ -393,7 +393,7 @@ pub struct Sender<T> { inner: UnsafeCell<Flavor<T>>, sends: Cell<uint>, // can't share in an arc - marker: marker::NoShare, + marker: marker::NoSync, } /// The sending-half of Rust's synchronous channel type. This half can only be @@ -402,7 +402,7 @@ pub struct Sender<T> { pub struct SyncSender<T> { inner: Arc<UnsafeCell<sync::Packet<T>>>, // can't share in an arc - marker: marker::NoShare, + marker: marker::NoSync, } /// This enumeration is the list of the possible reasons that try_recv could not @@ -537,7 +537,7 @@ impl<T: Send> Sender<T> { Sender { inner: UnsafeCell::new(inner), sends: Cell::new(0), - marker: marker::NoShare, + marker: marker::NoSync, } } @@ -713,7 +713,7 @@ impl<T: Send> Drop for Sender<T> { impl<T: Send> SyncSender<T> { fn new(inner: Arc<UnsafeCell<sync::Packet<T>>>) -> SyncSender<T> { - SyncSender { inner: inner, marker: marker::NoShare } + SyncSender { inner: inner, marker: marker::NoSync } } /// Sends a value on this synchronous channel. @@ -801,7 +801,7 @@ impl<T: Send> Drop for SyncSender<T> { impl<T: Send> Receiver<T> { fn new(inner: Flavor<T>) -> Receiver<T> { - Receiver { inner: UnsafeCell::new(inner), receives: Cell::new(0), marker: marker::NoShare } + Receiver { inner: UnsafeCell::new(inner), receives: Cell::new(0), marker: marker::NoSync } } /// Blocks waiting for a value on this receiver |
