Skip to content

Commit

Permalink
core: replace uses of old deriving attribute with new one
Browse files Browse the repository at this point in the history
  • Loading branch information
apasel422 committed Mar 22, 2013
1 parent 9584c60 commit 98e8fe1
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/libcore/cmp.rs
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/either.rs
Expand Up @@ -17,7 +17,7 @@ use result;
use vec;

/// The either type
#[deriving_eq]
#[deriving(Eq)]
pub enum Either<T, U> {
Left(T),
Right(U)
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/io.rs
Expand Up @@ -630,7 +630,7 @@ pub pure fn with_str_reader<T>(s: &str, f: &fn(@Reader) -> T) -> T {
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.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/option.rs
Expand Up @@ -52,7 +52,7 @@ use iter::{BaseIter, MutableIter};
#[cfg(test)] use str;

/// The option type
#[deriving_eq]
#[deriving(Eq)]
pub enum Option<T> {
None,
Some(T),
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/path.rs
Expand Up @@ -20,7 +20,7 @@ use option::{None, Option, Some};
use str;
use to_str::ToStr;

#[deriving_eq]
#[deriving(Eq)]
pub struct WindowsPath {
host: Option<~str>,
device: Option<~str>,
Expand All @@ -32,7 +32,7 @@ pub pure fn WindowsPath(s: &str) -> WindowsPath {
GenericPath::from_str(s)
}

#[deriving_eq]
#[deriving(Eq)]
pub struct PosixPath {
is_absolute: bool,
components: ~[~str],
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/result.rs
Expand Up @@ -20,7 +20,7 @@ use option::{None, Option, Some};
use vec;

/// The result type
#[deriving_eq]
#[deriving(Eq)]
pub enum Result<T, U> {
/// Contains the successful result value
Ok(T),
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/task/mod.rs
Expand Up @@ -50,13 +50,13 @@ pub mod rt;
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)
}
Expand Down Expand Up @@ -88,7 +88,7 @@ impl Eq for TaskResult {
}

/// Scheduler modes
#[deriving_eq]
#[deriving(Eq)]
pub enum SchedMode {
/// Run task on the default scheduler
DefaultScheduler,
Expand Down
18 changes: 9 additions & 9 deletions src/libcore/unstable/extfmt.rs
Expand Up @@ -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,
Expand All @@ -116,7 +116,7 @@ pub mod ct {
TyPoly,
}

#[deriving_eq]
#[deriving(Eq)]
pub enum Flag {
FlagLeftJustify,
FlagLeftZeroPad,
Expand All @@ -125,15 +125,15 @@ pub mod ct {
FlagAlternate,
}

#[deriving_eq]
#[deriving(Eq)]
pub enum Count {
CountIs(uint),
CountIsParam(uint),
CountIsNextParam,
CountImplied,
}

#[deriving_eq]
#[deriving(Eq)]
struct Parsed<T> {
val: T,
next: uint
Expand All @@ -146,7 +146,7 @@ pub mod ct {
}

// A formatted conversion from an expression to a string
#[deriving_eq]
#[deriving(Eq)]
pub struct Conv {
param: Option<uint>,
flags: ~[Flag],
Expand All @@ -156,7 +156,7 @@ pub mod ct {
}

// A fragment of the output sequence
#[deriving_eq]
#[deriving(Eq)]
pub enum Piece { PieceString(~str), PieceConv(Conv), }

pub type ErrorFn = @fn(&str) -> !;
Expand Down Expand Up @@ -596,7 +596,7 @@ pub mod rt {
};
}

#[deriving_eq]
#[deriving(Eq)]
pub enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat }

pub fn pad(cv: Conv, s: ~str, mode: PadMode) -> ~str {
Expand Down

0 comments on commit 98e8fe1

Please sign in to comment.