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

Lines changed: 85 additions & 85 deletions
Large diffs are not rendered by default.

src/libsyntax/ast_util.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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,

0 commit comments

Comments
 (0)