Skip to content

Commit 98e8fe1

Browse files
committed
core: replace uses of old deriving attribute with new one
1 parent 9584c60 commit 98e8fe1

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/libcore/cmp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub trait Eq {
3737
pure fn ne(&self, other: &Self) -> bool;
3838
}
3939

40-
#[deriving_eq]
40+
#[deriving(Eq)]
4141
pub enum Ordering { Less, Equal, Greater }
4242

4343
/// Trait for types that form a total order

src/libcore/either.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use result;
1717
use vec;
1818

1919
/// The either type
20-
#[deriving_eq]
20+
#[deriving(Eq)]
2121
pub enum Either<T, U> {
2222
Left(T),
2323
Right(U)

src/libcore/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ pub pure fn with_str_reader<T>(s: &str, f: &fn(@Reader) -> T) -> T {
630630
pub enum FileFlag { Append, Create, Truncate, NoFlag, }
631631
632632
// What type of writer are we?
633-
#[deriving_eq]
633+
#[deriving(Eq)]
634634
pub enum WriterType { Screen, File }
635635
636636
// FIXME (#2004): Seekable really should be orthogonal.

src/libcore/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use iter::{BaseIter, MutableIter};
5252
#[cfg(test)] use str;
5353

5454
/// The option type
55-
#[deriving_eq]
55+
#[deriving(Eq)]
5656
pub enum Option<T> {
5757
None,
5858
Some(T),

src/libcore/path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use option::{None, Option, Some};
2020
use str;
2121
use to_str::ToStr;
2222

23-
#[deriving_eq]
23+
#[deriving(Eq)]
2424
pub struct WindowsPath {
2525
host: Option<~str>,
2626
device: Option<~str>,
@@ -32,7 +32,7 @@ pub pure fn WindowsPath(s: &str) -> WindowsPath {
3232
GenericPath::from_str(s)
3333
}
3434

35-
#[deriving_eq]
35+
#[deriving(Eq)]
3636
pub struct PosixPath {
3737
is_absolute: bool,
3838
components: ~[~str],

src/libcore/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use option::{None, Option, Some};
2020
use vec;
2121

2222
/// The result type
23-
#[deriving_eq]
23+
#[deriving(Eq)]
2424
pub enum Result<T, U> {
2525
/// Contains the successful result value
2626
Ok(T),

src/libcore/task/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ pub mod rt;
5050
pub mod spawn;
5151

5252
/// A handle to a scheduler
53-
#[deriving_eq]
53+
#[deriving(Eq)]
5454
pub enum Scheduler {
5555
SchedulerHandle(sched_id)
5656
}
5757

5858
/// A handle to a task
59-
#[deriving_eq]
59+
#[deriving(Eq)]
6060
pub enum Task {
6161
TaskHandle(task_id)
6262
}
@@ -88,7 +88,7 @@ impl Eq for TaskResult {
8888
}
8989

9090
/// Scheduler modes
91-
#[deriving_eq]
91+
#[deriving(Eq)]
9292
pub enum SchedMode {
9393
/// Run task on the default scheduler
9494
DefaultScheduler,

src/libcore/unstable/extfmt.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ pub mod ct {
9797
use prelude::*;
9898
use str;
9999

100-
#[deriving_eq]
100+
#[deriving(Eq)]
101101
pub enum Signedness { Signed, Unsigned, }
102102

103-
#[deriving_eq]
103+
#[deriving(Eq)]
104104
pub enum Caseness { CaseUpper, CaseLower, }
105105

106-
#[deriving_eq]
106+
#[deriving(Eq)]
107107
pub enum Ty {
108108
TyBool,
109109
TyStr,
@@ -116,7 +116,7 @@ pub mod ct {
116116
TyPoly,
117117
}
118118

119-
#[deriving_eq]
119+
#[deriving(Eq)]
120120
pub enum Flag {
121121
FlagLeftJustify,
122122
FlagLeftZeroPad,
@@ -125,15 +125,15 @@ pub mod ct {
125125
FlagAlternate,
126126
}
127127

128-
#[deriving_eq]
128+
#[deriving(Eq)]
129129
pub enum Count {
130130
CountIs(uint),
131131
CountIsParam(uint),
132132
CountIsNextParam,
133133
CountImplied,
134134
}
135135

136-
#[deriving_eq]
136+
#[deriving(Eq)]
137137
struct Parsed<T> {
138138
val: T,
139139
next: uint
@@ -146,7 +146,7 @@ pub mod ct {
146146
}
147147

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

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

162162
pub type ErrorFn = @fn(&str) -> !;
@@ -596,7 +596,7 @@ pub mod rt {
596596
};
597597
}
598598
599-
#[deriving_eq]
599+
#[deriving(Eq)]
600600
pub enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat }
601601
602602
pub fn pad(cv: Conv, s: ~str, mode: PadMode) -> ~str {

0 commit comments

Comments
 (0)