about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-04 04:50:56 +0000
committerbors <bors@rust-lang.org>2015-01-04 04:50:56 +0000
commit470118f3e915cdc8f936aca0640b28a7a3d8dc6c (patch)
tree47f99908d999aa612a4cd44932dcdc3b3a1a966a /src/libstd/sync
parentc6c786671d692d7b13c2e5c68a53001327b4b125 (diff)
parent351409a62287c7993bc680d9dfcfa13cba9c9c0c (diff)
downloadrust-470118f3e915cdc8f936aca0640b28a7a3d8dc6c.tar.gz
rust-470118f3e915cdc8f936aca0640b28a7a3d8dc6c.zip
auto merge of #20504 : japaric/rust/derive-self, r=alexcrichton
I put the sed scripts in the commits, in case this needs a "rebase".
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/atomic.rs2
-rw-r--r--src/libstd/sync/condvar.rs4
-rw-r--r--src/libstd/sync/mpsc/blocking.rs2
-rw-r--r--src/libstd/sync/mpsc/mod.rs8
-rw-r--r--src/libstd/sync/mpsc/oneshot.rs2
-rw-r--r--src/libstd/sync/mpsc/select.rs4
-rw-r--r--src/libstd/sync/mpsc/shared.rs2
-rw-r--r--src/libstd/sync/mpsc/stream.rs2
-rw-r--r--src/libstd/sync/mpsc/sync.rs6
-rw-r--r--src/libstd/sync/mutex.rs2
-rw-r--r--src/libstd/sync/rwlock.rs4
11 files changed, 19 insertions, 19 deletions
diff --git a/src/libstd/sync/atomic.rs b/src/libstd/sync/atomic.rs
index d4d7607bde3..3652b45ce97 100644
--- a/src/libstd/sync/atomic.rs
+++ b/src/libstd/sync/atomic.rs
@@ -104,7 +104,7 @@ pub use core::atomic::{AtomicBool, AtomicInt, AtomicUint, AtomicPtr};
 pub use core::atomic::{INIT_ATOMIC_BOOL, INIT_ATOMIC_INT, INIT_ATOMIC_UINT};
 pub use core::atomic::{ATOMIC_BOOL_INIT, ATOMIC_INT_INIT, ATOMIC_UINT_INIT};
 pub use core::atomic::fence;
-pub use core::atomic::Ordering::{mod, Relaxed, Release, Acquire, AcqRel, SeqCst};
+pub use core::atomic::Ordering::{self, Relaxed, Release, Acquire, AcqRel, SeqCst};
 
 /// An atomic, nullable unique pointer
 ///
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs
index 19b8f5e62cf..28c36922ca6 100644
--- a/src/libstd/sync/condvar.rs
+++ b/src/libstd/sync/condvar.rs
@@ -10,8 +10,8 @@
 
 use prelude::v1::*;
 
-use sync::atomic::{mod, AtomicUint};
-use sync::poison::{mod, LockResult};
+use sync::atomic::{self, AtomicUint};
+use sync::poison::{self, LockResult};
 use sys_common::condvar as sys;
 use sys_common::mutex as sys_mutex;
 use time::Duration;
diff --git a/src/libstd/sync/mpsc/blocking.rs b/src/libstd/sync/mpsc/blocking.rs
index a5299012723..faff5f09f81 100644
--- a/src/libstd/sync/mpsc/blocking.rs
+++ b/src/libstd/sync/mpsc/blocking.rs
@@ -26,7 +26,7 @@ struct Inner {
 unsafe impl Send for Inner {}
 unsafe impl Sync for Inner {}
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct SignalToken {
     inner: Arc<Inner>,
 }
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index e9dc3d986ba..de1724cbc4e 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -379,7 +379,7 @@ pub struct SyncSender<T> {
 /// A `send` operation can only fail if the receiving end of a channel is
 /// disconnected, implying that the data could never be received. The error
 /// contains the data being sent as a payload so it can be recovered.
-#[deriving(PartialEq, Eq)]
+#[derive(PartialEq, Eq)]
 #[stable]
 pub struct SendError<T>(pub T);
 
@@ -387,13 +387,13 @@ pub struct SendError<T>(pub T);
 ///
 /// The `recv` operation can only fail if the sending half of a channel is
 /// disconnected, implying that no further messages will ever be received.
-#[deriving(PartialEq, Eq, Clone, Copy)]
+#[derive(PartialEq, Eq, Clone, Copy)]
 #[stable]
 pub struct RecvError;
 
 /// This enumeration is the list of the possible reasons that try_recv could not
 /// return data when called.
-#[deriving(PartialEq, Clone, Copy)]
+#[derive(PartialEq, Clone, Copy)]
 #[stable]
 pub enum TryRecvError {
     /// This channel is currently empty, but the sender(s) have not yet
@@ -409,7 +409,7 @@ pub enum TryRecvError {
 
 /// This enumeration is the list of the possible error outcomes for the
 /// `SyncSender::try_send` method.
-#[deriving(PartialEq, Clone)]
+#[derive(PartialEq, Clone)]
 #[stable]
 pub enum TrySendError<T> {
     /// The data could not be sent on the channel because it would require that
diff --git a/src/libstd/sync/mpsc/oneshot.rs b/src/libstd/sync/mpsc/oneshot.rs
index 5f599752a46..2811f403c6c 100644
--- a/src/libstd/sync/mpsc/oneshot.rs
+++ b/src/libstd/sync/mpsc/oneshot.rs
@@ -40,7 +40,7 @@ use self::MyUpgrade::*;
 use core::prelude::*;
 
 use sync::mpsc::Receiver;
-use sync::mpsc::blocking::{mod, SignalToken};
+use sync::mpsc::blocking::{self, SignalToken};
 use core::mem;
 use sync::atomic;
 
diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs
index 3d9dca7e21c..16adbf5aa4f 100644
--- a/src/libstd/sync/mpsc/select.rs
+++ b/src/libstd/sync/mpsc/select.rs
@@ -62,7 +62,7 @@ use core::mem;
 use core::uint;
 
 use sync::mpsc::{Receiver, RecvError};
-use sync::mpsc::blocking::{mod, SignalToken};
+use sync::mpsc::blocking::{self, SignalToken};
 
 /// The "receiver set" of the select interface. This structure is used to manage
 /// a set of receivers which are being selected over.
@@ -94,7 +94,7 @@ pub struct Handle<'rx, T:'rx> {
 struct Packets { cur: *mut Handle<'static, ()> }
 
 #[doc(hidden)]
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub enum StartResult {
     Installed,
     Abort,
diff --git a/src/libstd/sync/mpsc/shared.rs b/src/libstd/sync/mpsc/shared.rs
index e15c38cf9a1..cadac8e6272 100644
--- a/src/libstd/sync/mpsc/shared.rs
+++ b/src/libstd/sync/mpsc/shared.rs
@@ -27,7 +27,7 @@ use core::int;
 
 use sync::{atomic, Mutex, MutexGuard};
 use sync::mpsc::mpsc_queue as mpsc;
-use sync::mpsc::blocking::{mod, SignalToken};
+use sync::mpsc::blocking::{self, SignalToken};
 use sync::mpsc::select::StartResult;
 use sync::mpsc::select::StartResult::*;
 use thread::Thread;
diff --git a/src/libstd/sync/mpsc/stream.rs b/src/libstd/sync/mpsc/stream.rs
index 01b799283ee..c526e6acb8f 100644
--- a/src/libstd/sync/mpsc/stream.rs
+++ b/src/libstd/sync/mpsc/stream.rs
@@ -28,7 +28,7 @@ use core::cmp;
 use core::int;
 use thread::Thread;
 
-use sync::mpsc::blocking::{mod, SignalToken};
+use sync::mpsc::blocking::{self, SignalToken};
 use sync::mpsc::spsc_queue as spsc;
 use sync::mpsc::Receiver;
 use sync::atomic;
diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs
index 98f1c4c46f9..0eee10898bc 100644
--- a/src/libstd/sync/mpsc/sync.rs
+++ b/src/libstd/sync/mpsc/sync.rs
@@ -42,8 +42,8 @@ use vec::Vec;
 use core::mem;
 
 use sync::{atomic, Mutex, MutexGuard};
-use sync::mpsc::blocking::{mod, WaitToken, SignalToken};
-use sync::mpsc::select::StartResult::{mod, Installed, Abort};
+use sync::mpsc::blocking::{self, WaitToken, SignalToken};
+use sync::mpsc::select::StartResult::{self, Installed, Abort};
 
 pub struct Packet<T> {
     /// Only field outside of the mutex. Just done for kicks, but mainly because
@@ -103,7 +103,7 @@ struct Buffer<T> {
     size: uint,
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 pub enum Failure {
     Empty,
     Disconnected,
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index f9f9a809221..b158bd69c7b 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -13,7 +13,7 @@ use prelude::v1::*;
 use cell::UnsafeCell;
 use kinds::marker;
 use ops::{Deref, DerefMut};
-use sync::poison::{mod, TryLockError, TryLockResult, LockResult};
+use sync::poison::{self, TryLockError, TryLockResult, LockResult};
 use sys_common::mutex as sys;
 
 /// A mutual exclusion primitive useful for protecting shared data
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index 431aeb9cae9..b2367ff8352 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -13,7 +13,7 @@ use prelude::v1::*;
 use cell::UnsafeCell;
 use kinds::marker;
 use ops::{Deref, DerefMut};
-use sync::poison::{mod, LockResult, TryLockError, TryLockResult};
+use sync::poison::{self, LockResult, TryLockError, TryLockResult};
 use sys_common::rwlock as sys;
 
 /// A reader-writer lock
@@ -362,7 +362,7 @@ impl<'a, T> Drop for RWLockWriteGuard<'a, T> {
 mod tests {
     use prelude::v1::*;
 
-    use rand::{mod, Rng};
+    use rand::{self, Rng};
     use sync::mpsc::channel;
     use thread::Thread;
     use sync::{Arc, RWLock, StaticRWLock, RWLOCK_INIT};