Skip to content

Commit

Permalink
syntax: replace uses of old deriving attribute with new one
Browse files Browse the repository at this point in the history
  • Loading branch information
apasel422 committed Mar 22, 2013
1 parent 6e883c7 commit e2abecd
Show file tree
Hide file tree
Showing 13 changed files with 100 additions and 100 deletions.
170 changes: 85 additions & 85 deletions src/libsyntax/ast.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/libsyntax/ast_util.rs
Expand Up @@ -582,7 +582,7 @@ pub fn variant_visibility_to_privacy(visibility: visibility,
}
}

#[deriving_eq]
#[deriving(Eq)]
pub enum Privacy {
Private,
Public
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/codemap.rs
Expand Up @@ -128,7 +128,7 @@ pub struct span {

#[auto_encode]
#[auto_decode]
#[deriving_eq]
#[deriving(Eq)]
pub struct spanned<T> { node: T, span: span }

impl cmp::Eq for span {
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/diagnostic.rs
Expand Up @@ -160,7 +160,7 @@ pub fn mk_handler(emitter: Option<Emitter>) -> @handler {
@mut HandlerT { err_count: 0, emit: emit } as @handler
}

#[deriving_eq]
#[deriving(Eq)]
pub enum level {
fatal,
error,
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/auto_encode.rs
Expand Up @@ -1204,7 +1204,7 @@ mod test {
use std::serialize::Encoder;

// just adding the ones I want to test, for now:
#[deriving_eq]
#[deriving(Eq)]
pub enum call {
CallToEmitEnum(~str),
CallToEmitEnumVariant(~str, uint, uint),
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/ext/deriving/mod.rs
Expand Up @@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

/// The compiler code necessary to implement the #[deriving_eq] and
/// #[deriving_iter_bytes] extensions.
/// The compiler code necessary to implement the #[deriving(Eq)] and
/// #[deriving(IterBytes)] extensions.

use core::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/pipes/proto.rs
Expand Up @@ -17,7 +17,7 @@ use ext::pipes::ast_builder::{append_types, ext_ctxt_ast_builder, path};

use core::to_str::ToStr;

#[deriving_eq]
#[deriving(Eq)]
pub enum direction { send, recv }

impl ToStr for direction {
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/opt_vec.rs
Expand Up @@ -106,7 +106,7 @@ impl<T:Copy> OptVec<T> {

impl<A:Eq> Eq for OptVec<A> {
pure fn eq(&self, other: &OptVec<A>) -> bool {
// Note: cannot use #[deriving_eq] here because
// Note: cannot use #[deriving(Eq)] here because
// (Empty, Vec(~[])) ought to be equal.
match (self, other) {
(&Empty, &Empty) => true,
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/lexer.rs
Expand Up @@ -37,7 +37,7 @@ pub trait reader {
fn dup(@mut self) -> @reader;
}

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

pub struct StringReader {
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/obsolete.rs
Expand Up @@ -30,7 +30,7 @@ use core::str;
use core::to_bytes;

/// The specific types of unsupported syntax
#[deriving_eq]
#[deriving(Eq)]
pub enum ObsoleteSyntax {
ObsoleteLowerCaseKindBounds,
ObsoleteLet,
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser.rs
Expand Up @@ -93,7 +93,7 @@ use core::either;
use core::vec;
use std::oldmap::HashMap;

#[deriving_eq]
#[deriving(Eq)]
enum restriction {
UNRESTRICTED,
RESTRICT_STMT_EXPR,
Expand Down
6 changes: 3 additions & 3 deletions src/libsyntax/parse/token.rs
Expand Up @@ -24,7 +24,7 @@ use std::oldmap::HashMap;

#[auto_encode]
#[auto_decode]
#[deriving_eq]
#[deriving(Eq)]
pub enum binop {
PLUS,
MINUS,
Expand All @@ -40,7 +40,7 @@ pub enum binop {

#[auto_encode]
#[auto_decode]
#[deriving_eq]
#[deriving(Eq)]
pub enum Token {
/* Expression-operator symbols. */
EQ,
Expand Down Expand Up @@ -103,7 +103,7 @@ pub enum Token {

#[auto_encode]
#[auto_decode]
#[deriving_eq]
#[deriving(Eq)]
/// For interpolation during macro expansion.
pub enum nonterminal {
nt_item(@ast::item),
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/print/pp.rs
Expand Up @@ -66,7 +66,7 @@ use core::vec;
* line (which it can't) and so naturally place the content on its own line to
* avoid combining it with other lines and making matters even worse.
*/
#[deriving_eq]
#[deriving(Eq)]
pub enum breaks { consistent, inconsistent, }

pub struct break_t {
Expand Down

0 comments on commit e2abecd

Please sign in to comment.