core: replace uses of old deriving attribute with new one

This commit is contained in:
Andrew Paseltiner 2013-03-20 11:35:02 -04:00
parent 9584c60871
commit 98e8fe12d2
8 changed files with 19 additions and 19 deletions

View 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

View file

@ -17,7 +17,7 @@ use result;
use vec;
/// The either type
#[deriving_eq]
#[deriving(Eq)]
pub enum Either<T, U> {
Left(T),
Right(U)

View file

@ -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.

View file

@ -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),

View file

@ -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>,
@ -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],

View file

@ -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),

View file

@ -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)
}
@ -88,7 +88,7 @@ impl Eq for TaskResult {
}
/// Scheduler modes
#[deriving_eq]
#[deriving(Eq)]
pub enum SchedMode {
/// Run task on the default scheduler
DefaultScheduler,

View 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 mod ct {
TyPoly,
}
#[deriving_eq]
#[deriving(Eq)]
pub enum Flag {
FlagLeftJustify,
FlagLeftZeroPad,
@ -125,7 +125,7 @@ pub mod ct {
FlagAlternate,
}
#[deriving_eq]
#[deriving(Eq)]
pub enum Count {
CountIs(uint),
CountIsParam(uint),
@ -133,7 +133,7 @@ pub mod ct {
CountImplied,
}
#[deriving_eq]
#[deriving(Eq)]
struct Parsed<T> {
val: T,
next: uint
@ -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],
@ -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) -> !;
@ -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 {