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 vec;
/// The either type
#[deriving_eq]
#[deriving(Eq)]
pub enum Either<T, U> {
Left(T),
Right(U)

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

View File

@ -52,7 +52,7 @@
#[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 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],

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

View File

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

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 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 {