Skip to content

Commit e2abecd

Browse files
committed
syntax: replace uses of old deriving attribute with new one
1 parent 6e883c7 commit e2abecd

File tree

13 files changed

+100
-100
lines changed

13 files changed

+100
-100
lines changed

src/libsyntax/ast.rs

+85-85
Large diffs are not rendered by default.

src/libsyntax/ast_util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ pub fn variant_visibility_to_privacy(visibility: visibility,
582582
}
583583
}
584584

585-
#[deriving_eq]
585+
#[deriving(Eq)]
586586
pub enum Privacy {
587587
Private,
588588
Public

src/libsyntax/codemap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub struct span {
128128

129129
#[auto_encode]
130130
#[auto_decode]
131-
#[deriving_eq]
131+
#[deriving(Eq)]
132132
pub struct spanned<T> { node: T, span: span }
133133

134134
impl cmp::Eq for span {

src/libsyntax/diagnostic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub fn mk_handler(emitter: Option<Emitter>) -> @handler {
160160
@mut HandlerT { err_count: 0, emit: emit } as @handler
161161
}
162162

163-
#[deriving_eq]
163+
#[deriving(Eq)]
164164
pub enum level {
165165
fatal,
166166
error,

src/libsyntax/ext/auto_encode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ mod test {
12041204
use std::serialize::Encoder;
12051205
12061206
// just adding the ones I want to test, for now:
1207-
#[deriving_eq]
1207+
#[deriving(Eq)]
12081208
pub enum call {
12091209
CallToEmitEnum(~str),
12101210
CallToEmitEnumVariant(~str, uint, uint),

src/libsyntax/ext/deriving/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
/// The compiler code necessary to implement the #[deriving_eq] and
12-
/// #[deriving_iter_bytes] extensions.
11+
/// The compiler code necessary to implement the #[deriving(Eq)] and
12+
/// #[deriving(IterBytes)] extensions.
1313
1414
use core::prelude::*;
1515

src/libsyntax/ext/pipes/proto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use ext::pipes::ast_builder::{append_types, ext_ctxt_ast_builder, path};
1717

1818
use core::to_str::ToStr;
1919

20-
#[deriving_eq]
20+
#[deriving(Eq)]
2121
pub enum direction { send, recv }
2222

2323
impl ToStr for direction {

src/libsyntax/opt_vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<T:Copy> OptVec<T> {
106106

107107
impl<A:Eq> Eq for OptVec<A> {
108108
pure fn eq(&self, other: &OptVec<A>) -> bool {
109-
// Note: cannot use #[deriving_eq] here because
109+
// Note: cannot use #[deriving(Eq)] here because
110110
// (Empty, Vec(~[])) ought to be equal.
111111
match (self, other) {
112112
(&Empty, &Empty) => true,

src/libsyntax/parse/lexer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub trait reader {
3737
fn dup(@mut self) -> @reader;
3838
}
3939

40-
#[deriving_eq]
40+
#[deriving(Eq)]
4141
pub struct TokenAndSpan {tok: token::Token, sp: span}
4242

4343
pub struct StringReader {

src/libsyntax/parse/obsolete.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use core::str;
3030
use core::to_bytes;
3131

3232
/// The specific types of unsupported syntax
33-
#[deriving_eq]
33+
#[deriving(Eq)]
3434
pub enum ObsoleteSyntax {
3535
ObsoleteLowerCaseKindBounds,
3636
ObsoleteLet,

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ use core::either;
9393
use core::vec;
9494
use std::oldmap::HashMap;
9595

96-
#[deriving_eq]
96+
#[deriving(Eq)]
9797
enum restriction {
9898
UNRESTRICTED,
9999
RESTRICT_STMT_EXPR,

src/libsyntax/parse/token.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::oldmap::HashMap;
2424

2525
#[auto_encode]
2626
#[auto_decode]
27-
#[deriving_eq]
27+
#[deriving(Eq)]
2828
pub enum binop {
2929
PLUS,
3030
MINUS,
@@ -40,7 +40,7 @@ pub enum binop {
4040

4141
#[auto_encode]
4242
#[auto_decode]
43-
#[deriving_eq]
43+
#[deriving(Eq)]
4444
pub enum Token {
4545
/* Expression-operator symbols. */
4646
EQ,
@@ -103,7 +103,7 @@ pub enum Token {
103103

104104
#[auto_encode]
105105
#[auto_decode]
106-
#[deriving_eq]
106+
#[deriving(Eq)]
107107
/// For interpolation during macro expansion.
108108
pub enum nonterminal {
109109
nt_item(@ast::item),

src/libsyntax/print/pp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ use core::vec;
6666
* line (which it can't) and so naturally place the content on its own line to
6767
* avoid combining it with other lines and making matters even worse.
6868
*/
69-
#[deriving_eq]
69+
#[deriving(Eq)]
7070
pub enum breaks { consistent, inconsistent, }
7171

7272
pub struct break_t {

0 commit comments

Comments
 (0)