Skip to content

Commit 4055fe8

Browse files
committed
std: replace uses of old deriving attribute with new one
1 parent 98e8fe1 commit 4055fe8

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

src/libstd/deque.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,15 @@ mod tests {
253253
fail_unless!(*deq.get(3) == d);
254254
}
255255

256-
#[deriving_eq]
256+
#[deriving(Eq)]
257257
enum Taggy { One(int), Two(int, int), Three(int, int, int), }
258258

259-
#[deriving_eq]
259+
#[deriving(Eq)]
260260
enum Taggypar<T> {
261261
Onepar(int), Twopar(int, int), Threepar(int, int, int),
262262
}
263263

264-
#[deriving_eq]
264+
#[deriving(Eq)]
265265
struct RecCy {
266266
x: int,
267267
y: int,

src/libstd/getopts.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,20 @@ use core::option::{Some, None};
8686
use core::str;
8787
use core::vec;
8888

89-
#[deriving_eq]
89+
#[deriving(Eq)]
9090
pub enum Name {
9191
Long(~str),
9292
Short(char),
9393
}
9494

95-
#[deriving_eq]
95+
#[deriving(Eq)]
9696
pub enum HasArg { Yes, No, Maybe, }
9797

98-
#[deriving_eq]
98+
#[deriving(Eq)]
9999
pub enum Occur { Req, Optional, Multi, }
100100

101101
/// A description of a possible option
102-
#[deriving_eq]
102+
#[deriving(Eq)]
103103
pub struct Opt {
104104
name: Name,
105105
hasarg: HasArg,
@@ -146,14 +146,14 @@ pub fn optmulti(name: &str) -> Opt {
146146
return Opt {name: mkname(name), hasarg: Yes, occur: Multi};
147147
}
148148

149-
#[deriving_eq]
149+
#[deriving(Eq)]
150150
enum Optval { Val(~str), Given, }
151151

152152
/**
153153
* The result of checking command line arguments. Contains a vector
154154
* of matches and a vector of free strings.
155155
*/
156-
#[deriving_eq]
156+
#[deriving(Eq)]
157157
pub struct Matches {
158158
opts: ~[Opt],
159159
vals: ~[~[Optval]],
@@ -179,7 +179,7 @@ fn find_opt(opts: &[Opt], nm: Name) -> Option<uint> {
179179
* The type returned when the command line does not conform to the
180180
* expected format. Pass this value to <fail_str> to get an error message.
181181
*/
182-
#[deriving_eq]
182+
#[deriving(Eq)]
183183
pub enum Fail_ {
184184
ArgumentMissing(~str),
185185
UnrecognizedOption(~str),
@@ -446,7 +446,7 @@ pub fn opt_default(mm: &Matches, nm: &str, def: &str) -> Option<~str> {
446446
_ => Some::<~str>(str::from_slice(def)) }
447447
}
448448

449-
#[deriving_eq]
449+
#[deriving(Eq)]
450450
pub enum FailType {
451451
ArgumentMissing_,
452452
UnrecognizedOption_,
@@ -469,7 +469,7 @@ pub mod groups {
469469
/** one group of options, e.g., both -h and --help, along with
470470
* their shared description and properties
471471
*/
472-
#[deriving_eq]
472+
#[deriving(Eq)]
473473
pub struct OptGroup {
474474
short_name: ~str,
475475
long_name: ~str,

src/libstd/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use core::option::*;
1515
use core::prelude::*;
1616
use core::vec;
1717

18-
#[deriving_eq]
18+
#[deriving(Eq)]
1919
pub enum List<T> {
2020
Cons(T, @List<T>),
2121
Nil,

src/libstd/net_url.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use core::to_str::ToStr;
2525
use core::to_str;
2626
use core::uint;
2727

28-
#[deriving_eq]
28+
#[deriving(Eq)]
2929
struct Url {
3030
scheme: ~str,
3131
user: Option<UserInfo>,
@@ -36,7 +36,7 @@ struct Url {
3636
fragment: Option<~str>
3737
}
3838

39-
#[deriving_eq]
39+
#[deriving(Eq)]
4040
struct UserInfo {
4141
user: ~str,
4242
pass: Option<~str>
@@ -398,7 +398,7 @@ pub pure fn get_scheme(rawurl: &str) -> Result<(~str, ~str), ~str> {
398398
return Err(~"url: Scheme must be terminated with a colon.");
399399
}
400400

401-
#[deriving_eq]
401+
#[deriving(Eq)]
402402
enum Input {
403403
Digit, // all digits
404404
Hex, // digits and letters a-f

src/libstd/semver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use core::str;
1919
use core::to_str::ToStr;
2020
use core::uint;
2121

22-
#[deriving_eq]
22+
#[deriving(Eq)]
2323
pub enum Identifier {
2424
Numeric(uint),
2525
AlphaNumeric(~str)
@@ -60,7 +60,7 @@ impl ToStr for Identifier {
6060
}
6161

6262

63-
#[deriving_eq]
63+
#[deriving(Eq)]
6464
pub struct Version {
6565
major: uint,
6666
minor: uint,

src/libstd/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ pub fn parse_opts(args: &[~str]) -> OptRes {
188188
either::Left(test_opts)
189189
}
190190
191-
#[deriving_eq]
191+
#[deriving(Eq)]
192192
pub struct BenchSamples {
193193
ns_iter_samples: ~[f64],
194194
mb_s: uint
195195
}
196196
197-
#[deriving_eq]
197+
#[deriving(Eq)]
198198
pub enum TestResult { TrOk, TrFailed, TrIgnored, TrBench(BenchSamples) }
199199
200200
struct ConsoleTestState {

src/libstd/workcache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ use core::mutable::Mut;
9696
*
9797
*/
9898

99-
#[deriving_eq]
99+
#[deriving(Eq)]
100100
#[auto_encode]
101101
#[auto_decode]
102102
struct WorkKey {

0 commit comments

Comments
 (0)