]> git.lizzy.rs Git - rust.git/commitdiff
core: replace uses of old deriving attribute with new one
authorAndrew Paseltiner <apaseltiner@gmail.com>
Wed, 20 Mar 2013 15:35:02 +0000 (11:35 -0400)
committerAndrew Paseltiner <apaseltiner@gmail.com>
Fri, 22 Mar 2013 10:24:19 +0000 (06:24 -0400)
src/libcore/cmp.rs
src/libcore/either.rs
src/libcore/io.rs
src/libcore/option.rs
src/libcore/path.rs
src/libcore/result.rs
src/libcore/task/mod.rs
src/libcore/unstable/extfmt.rs

index 25778f08757c3ee2435801d999885887da07624a..fc8ed5d70c33d2c49da4074b22ab410c90f1acee 100644 (file)
@@ -37,7 +37,7 @@ pub trait Eq {
     pure fn ne(&self, other: &Self) -> bool;
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Ordering { Less, Equal, Greater }
 
 /// Trait for types that form a total order
index 2410ef39332778646d35c79d756e08f50cb48f3f..a036c19c1580e7aa9caf386dc6208bd11524a5e6 100644 (file)
@@ -17,7 +17,7 @@
 use vec;
 
 /// The either type
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Either<T, U> {
     Left(T),
     Right(U)
index b160da359f8d319a00f086da340893c44dfee900..94e06924e6957ef12e98f05d91d0a8d20cf152a8 100644 (file)
@@ -630,7 +630,7 @@ fn tell(&self) -> uint { self.pos }
 pub enum FileFlag { Append, Create, Truncate, NoFlag, }
 
 // What type of writer are we?
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum WriterType { Screen, File }
 
 // FIXME (#2004): Seekable really should be orthogonal.
index 8103166909c7fdfd273f215431eadee62b7eda7e..c12b78b393f65f39183f6f97356d842e75d9f63d 100644 (file)
@@ -52,7 +52,7 @@
 #[cfg(test)] use str;
 
 /// The option type
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Option<T> {
     None,
     Some(T),
index bc6d6b507b202b64095457a57e9d18187b309bd4..df4a3fdfb9e4a83ece928281f8518301d6a3de02 100644 (file)
@@ -20,7 +20,7 @@
 use str;
 use to_str::ToStr;
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub struct WindowsPath {
     host: Option<~str>,
     device: Option<~str>,
@@ -32,7 +32,7 @@ pub struct WindowsPath {
     GenericPath::from_str(s)
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub struct PosixPath {
     is_absolute: bool,
     components: ~[~str],
index 832071a0ba81b086c949ce9a427d03ecbbc9b022..18594a73d65ede8cdce8391221ef2d7fd77fa2ab 100644 (file)
@@ -20,7 +20,7 @@
 use vec;
 
 /// The result type
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Result<T, U> {
     /// Contains the successful result value
     Ok(T),
index 31c44531efec0727a84cfc1f15c3758f5d757e59..1ef2316ec07afecb6acf68509ca678e91902ac87 100644 (file)
 pub mod spawn;
 
 /// A handle to a scheduler
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Scheduler {
     SchedulerHandle(sched_id)
 }
 
 /// A handle to a task
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Task {
     TaskHandle(task_id)
 }
@@ -88,7 +88,7 @@ impl Eq for TaskResult {
 }
 
 /// Scheduler modes
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum SchedMode {
     /// Run task on the default scheduler
     DefaultScheduler,
index a5c22fe0ad30359196c4d18d1d070f8295a28127..28f810c3a28710c8fa1c93128ab311ed634ad919 100644 (file)
@@ -97,13 +97,13 @@ pub mod ct {
     use prelude::*;
     use str;
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub enum Signedness { Signed, Unsigned, }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub enum Caseness { CaseUpper, CaseLower, }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub enum Ty {
         TyBool,
         TyStr,
@@ -116,7 +116,7 @@ pub enum Ty {
         TyPoly,
     }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub enum Flag {
         FlagLeftJustify,
         FlagLeftZeroPad,
@@ -125,7 +125,7 @@ pub enum Flag {
         FlagAlternate,
     }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub enum Count {
         CountIs(uint),
         CountIsParam(uint),
@@ -133,7 +133,7 @@ pub enum Count {
         CountImplied,
     }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     struct Parsed<T> {
         val: T,
         next: uint
@@ -146,7 +146,7 @@ pub impl<T> Parsed<T> {
     }
 
     // A formatted conversion from an expression to a string
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub struct Conv {
         param: Option<uint>,
         flags: ~[Flag],
@@ -156,7 +156,7 @@ pub struct Conv {
     }
 
     // A fragment of the output sequence
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub enum Piece { PieceString(~str), PieceConv(Conv), }
 
     pub type ErrorFn = @fn(&str) -> !;
@@ -596,7 +596,7 @@ pub struct Conv {
             };
     }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat }
 
     pub fn pad(cv: Conv, s: ~str, mode: PadMode) -> ~str {