Skip to content

Commit 9966eaa

Browse files
committed
rustc: replace uses of old deriving attribute with new one
1 parent 72d7d60 commit 9966eaa

File tree

20 files changed

+62
-62
lines changed

20 files changed

+62
-62
lines changed

src/librustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use syntax::ast_map::{path, path_mod, path_name};
3838
use syntax::attr;
3939
use syntax::print::pprust;
4040

41-
#[deriving_eq]
41+
#[deriving(Eq)]
4242
pub enum output_type {
4343
output_type_none,
4444
output_type_bitcode,

src/librustc/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ pub fn parse_input(sess: Session, +cfg: ast::crate_cfg, input: input)
161161
}
162162
}
163163

164-
#[deriving_eq]
164+
#[deriving(Eq)]
165165
pub enum compile_upto {
166166
cu_parse,
167167
cu_expand,

src/librustc/driver/session.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ use syntax::parse::ParseSess;
2727
use syntax::{ast, codemap};
2828
use syntax;
2929

30-
#[deriving_eq]
30+
#[deriving(Eq)]
3131
pub enum os { os_win32, os_macos, os_linux, os_android, os_freebsd, }
3232

33-
#[deriving_eq]
33+
#[deriving(Eq)]
3434
pub enum arch { arch_x86, arch_x86_64, arch_arm, arch_mips, }
3535

3636
pub enum crate_type { bin_crate, lib_crate, unknown_crate, }
@@ -104,7 +104,7 @@ pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
104104
]
105105
}
106106

107-
#[deriving_eq]
107+
#[deriving(Eq)]
108108
pub enum OptLevel {
109109
No, // -O0
110110
Less, // -O1

src/librustc/lib/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub enum RealPredicate {
127127

128128
// enum for the LLVM TypeKind type - must stay in sync with the def of
129129
// LLVMTypeKind in llvm/include/llvm-c/Core.h
130-
#[deriving_eq]
130+
#[deriving(Eq)]
131131
pub enum TypeKind {
132132
Void = 0,
133133
Half = 1,

src/librustc/metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fn lookup_item(item_id: int, data: @~[u8]) -> ebml::Doc {
9393
}
9494
}
9595

96-
#[deriving_eq]
96+
#[deriving(Eq)]
9797
enum Family {
9898
Const, // c
9999
Fn, // f

src/librustc/middle/borrowck/check_loans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct CheckLoanCtxt {
5151
}
5252

5353
// if we are enforcing purity, why are we doing so?
54-
#[deriving_eq]
54+
#[deriving(Eq)]
5555
enum purity_cause {
5656
// enforcing purity because fn was declared pure:
5757
pc_pure_fn,
@@ -80,7 +80,7 @@ pub fn check_loans(bccx: @BorrowckCtxt,
8080
visit::visit_crate(*crate, clcx, vt);
8181
}
8282

83-
#[deriving_eq]
83+
#[deriving(Eq)]
8484
enum assignment_type {
8585
at_straight_up,
8686
at_swap

src/librustc/middle/borrowck/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ pub type root_map = HashMap<root_map_key, RootInfo>;
340340
// if you have an expression `x.f` and x has type ~@T, we could add an
341341
// entry {id:x, derefs:0} to refer to `x` itself, `{id:x, derefs:1}`
342342
// to refer to the deref of the unique pointer, and so on.
343-
#[deriving_eq]
343+
#[deriving(Eq)]
344344
pub struct root_map_key {
345345
id: ast::node_id,
346346
derefs: uint
@@ -355,7 +355,7 @@ pub type mutbl_map = HashMap<ast::node_id, ()>;
355355
pub type write_guard_map = HashMap<root_map_key, ()>;
356356

357357
// Errors that can occur
358-
#[deriving_eq]
358+
#[deriving(Eq)]
359359
pub enum bckerr_code {
360360
err_mut_uniq,
361361
err_mut_variant,
@@ -367,7 +367,7 @@ pub enum bckerr_code {
367367

368368
// Combination of an error code and the categorization of the expression
369369
// that caused it
370-
#[deriving_eq]
370+
#[deriving(Eq)]
371371
pub struct bckerr {
372372
cmt: cmt,
373373
code: bckerr_code
@@ -382,7 +382,7 @@ pub enum MoveError {
382382
// shorthand for something that fails with `bckerr` or succeeds with `T`
383383
pub type bckres<T> = Result<T, bckerr>;
384384

385-
#[deriving_eq]
385+
#[deriving(Eq)]
386386
pub enum LoanKind {
387387
TotalFreeze, // Entire path is frozen (borrowed as &T)
388388
PartialFreeze, // Some subpath is frozen (borrowed as &T)

src/librustc/middle/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ pub type matrix = ~[~[@pat]];
183183
184184
pub enum useful { useful(ty::t, ctor), useful_, not_useful }
185185
186-
#[deriving_eq]
186+
#[deriving(Eq)]
187187
pub enum ctor {
188188
single,
189189
variant(def_id),

src/librustc/middle/const_eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pub fn process_crate(crate: @ast::crate,
240240

241241
// FIXME (#33): this doesn't handle big integer/float literals correctly
242242
// (nor does the rest of our literal handling).
243-
#[deriving_eq]
243+
#[deriving(Eq)]
244244
pub enum const_val {
245245
const_float(f64),
246246
const_int(i64),

src/librustc/middle/lint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ use syntax::{ast, ast_util, visit};
6060
* process.
6161
*/
6262

63-
#[deriving_eq]
63+
#[deriving(Eq)]
6464
pub enum lint {
6565
ctypes,
6666
unused_imports,
@@ -99,7 +99,7 @@ pub fn level_to_str(lv: level) -> &'static str {
9999
}
100100
}
101101

102-
#[deriving_eq]
102+
#[deriving(Eq)]
103103
pub enum level {
104104
allow, warn, deny, forbid
105105
}

0 commit comments

Comments
 (0)