core: replace uses of old deriving attribute with new one
This commit is contained in:
parent
9584c60871
commit
98e8fe12d2
@ -37,7 +37,7 @@ pub trait Eq {
|
|||||||
pure fn ne(&self, other: &Self) -> bool;
|
pure fn ne(&self, other: &Self) -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Ordering { Less, Equal, Greater }
|
pub enum Ordering { Less, Equal, Greater }
|
||||||
|
|
||||||
/// Trait for types that form a total order
|
/// Trait for types that form a total order
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
use vec;
|
use vec;
|
||||||
|
|
||||||
/// The either type
|
/// The either type
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Either<T, U> {
|
pub enum Either<T, U> {
|
||||||
Left(T),
|
Left(T),
|
||||||
Right(U)
|
Right(U)
|
||||||
|
@ -630,7 +630,7 @@ fn tell(&self) -> uint { self.pos }
|
|||||||
pub enum FileFlag { Append, Create, Truncate, NoFlag, }
|
pub enum FileFlag { Append, Create, Truncate, NoFlag, }
|
||||||
|
|
||||||
// What type of writer are we?
|
// What type of writer are we?
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum WriterType { Screen, File }
|
pub enum WriterType { Screen, File }
|
||||||
|
|
||||||
// FIXME (#2004): Seekable really should be orthogonal.
|
// FIXME (#2004): Seekable really should be orthogonal.
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#[cfg(test)] use str;
|
#[cfg(test)] use str;
|
||||||
|
|
||||||
/// The option type
|
/// The option type
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Option<T> {
|
pub enum Option<T> {
|
||||||
None,
|
None,
|
||||||
Some(T),
|
Some(T),
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
use str;
|
use str;
|
||||||
use to_str::ToStr;
|
use to_str::ToStr;
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub struct WindowsPath {
|
pub struct WindowsPath {
|
||||||
host: Option<~str>,
|
host: Option<~str>,
|
||||||
device: Option<~str>,
|
device: Option<~str>,
|
||||||
@ -32,7 +32,7 @@ pub struct WindowsPath {
|
|||||||
GenericPath::from_str(s)
|
GenericPath::from_str(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub struct PosixPath {
|
pub struct PosixPath {
|
||||||
is_absolute: bool,
|
is_absolute: bool,
|
||||||
components: ~[~str],
|
components: ~[~str],
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
use vec;
|
use vec;
|
||||||
|
|
||||||
/// The result type
|
/// The result type
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Result<T, U> {
|
pub enum Result<T, U> {
|
||||||
/// Contains the successful result value
|
/// Contains the successful result value
|
||||||
Ok(T),
|
Ok(T),
|
||||||
|
@ -50,13 +50,13 @@
|
|||||||
pub mod spawn;
|
pub mod spawn;
|
||||||
|
|
||||||
/// A handle to a scheduler
|
/// A handle to a scheduler
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Scheduler {
|
pub enum Scheduler {
|
||||||
SchedulerHandle(sched_id)
|
SchedulerHandle(sched_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A handle to a task
|
/// A handle to a task
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Task {
|
pub enum Task {
|
||||||
TaskHandle(task_id)
|
TaskHandle(task_id)
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ impl Eq for TaskResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Scheduler modes
|
/// Scheduler modes
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum SchedMode {
|
pub enum SchedMode {
|
||||||
/// Run task on the default scheduler
|
/// Run task on the default scheduler
|
||||||
DefaultScheduler,
|
DefaultScheduler,
|
||||||
|
@ -97,13 +97,13 @@ pub mod ct {
|
|||||||
use prelude::*;
|
use prelude::*;
|
||||||
use str;
|
use str;
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Signedness { Signed, Unsigned, }
|
pub enum Signedness { Signed, Unsigned, }
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Caseness { CaseUpper, CaseLower, }
|
pub enum Caseness { CaseUpper, CaseLower, }
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Ty {
|
pub enum Ty {
|
||||||
TyBool,
|
TyBool,
|
||||||
TyStr,
|
TyStr,
|
||||||
@ -116,7 +116,7 @@ pub enum Ty {
|
|||||||
TyPoly,
|
TyPoly,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Flag {
|
pub enum Flag {
|
||||||
FlagLeftJustify,
|
FlagLeftJustify,
|
||||||
FlagLeftZeroPad,
|
FlagLeftZeroPad,
|
||||||
@ -125,7 +125,7 @@ pub enum Flag {
|
|||||||
FlagAlternate,
|
FlagAlternate,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Count {
|
pub enum Count {
|
||||||
CountIs(uint),
|
CountIs(uint),
|
||||||
CountIsParam(uint),
|
CountIsParam(uint),
|
||||||
@ -133,7 +133,7 @@ pub enum Count {
|
|||||||
CountImplied,
|
CountImplied,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
struct Parsed<T> {
|
struct Parsed<T> {
|
||||||
val: T,
|
val: T,
|
||||||
next: uint
|
next: uint
|
||||||
@ -146,7 +146,7 @@ pub impl<T> Parsed<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A formatted conversion from an expression to a string
|
// A formatted conversion from an expression to a string
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub struct Conv {
|
pub struct Conv {
|
||||||
param: Option<uint>,
|
param: Option<uint>,
|
||||||
flags: ~[Flag],
|
flags: ~[Flag],
|
||||||
@ -156,7 +156,7 @@ pub struct Conv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A fragment of the output sequence
|
// A fragment of the output sequence
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum Piece { PieceString(~str), PieceConv(Conv), }
|
pub enum Piece { PieceString(~str), PieceConv(Conv), }
|
||||||
|
|
||||||
pub type ErrorFn = @fn(&str) -> !;
|
pub type ErrorFn = @fn(&str) -> !;
|
||||||
@ -596,7 +596,7 @@ pub struct Conv {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving_eq]
|
#[deriving(Eq)]
|
||||||
pub enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat }
|
pub enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat }
|
||||||
|
|
||||||
pub fn pad(cv: Conv, s: ~str, mode: PadMode) -> ~str {
|
pub fn pad(cv: Conv, s: ~str, mode: PadMode) -> ~str {
|
||||||
|
Loading…
Reference in New Issue
Block a user