From 98e8fe12d232bd77d46c75e69236d11277732e82 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Wed, 20 Mar 2013 11:35:02 -0400 Subject: [PATCH] core: replace uses of old deriving attribute with new one --- src/libcore/cmp.rs | 2 +- src/libcore/either.rs | 2 +- src/libcore/io.rs | 2 +- src/libcore/option.rs | 2 +- src/libcore/path.rs | 4 ++-- src/libcore/result.rs | 2 +- src/libcore/task/mod.rs | 6 +++--- src/libcore/unstable/extfmt.rs | 18 +++++++++--------- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 25778f08757..fc8ed5d70c3 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -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 diff --git a/src/libcore/either.rs b/src/libcore/either.rs index 2410ef39332..a036c19c158 100644 --- a/src/libcore/either.rs +++ b/src/libcore/either.rs @@ -17,7 +17,7 @@ use vec; /// The either type -#[deriving_eq] +#[deriving(Eq)] pub enum Either { Left(T), Right(U) diff --git a/src/libcore/io.rs b/src/libcore/io.rs index b160da359f8..94e06924e69 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -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. diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 8103166909c..c12b78b393f 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -52,7 +52,7 @@ #[cfg(test)] use str; /// The option type -#[deriving_eq] +#[deriving(Eq)] pub enum Option { None, Some(T), diff --git a/src/libcore/path.rs b/src/libcore/path.rs index bc6d6b507b2..df4a3fdfb9e 100644 --- a/src/libcore/path.rs +++ b/src/libcore/path.rs @@ -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], diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 832071a0ba8..18594a73d65 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -20,7 +20,7 @@ use vec; /// The result type -#[deriving_eq] +#[deriving(Eq)] pub enum Result { /// Contains the successful result value Ok(T), diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs index 31c44531efe..1ef2316ec07 100644 --- a/src/libcore/task/mod.rs +++ b/src/libcore/task/mod.rs @@ -50,13 +50,13 @@ 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, diff --git a/src/libcore/unstable/extfmt.rs b/src/libcore/unstable/extfmt.rs index a5c22fe0ad3..28f810c3a28 100644 --- a/src/libcore/unstable/extfmt.rs +++ b/src/libcore/unstable/extfmt.rs @@ -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 { val: T, next: uint @@ -146,7 +146,7 @@ pub impl Parsed { } // A formatted conversion from an expression to a string - #[deriving_eq] + #[deriving(Eq)] pub struct Conv { param: Option, 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 {