1
Fork 0

syntax: replace uses of old deriving attribute with new one

This commit is contained in:
Andrew Paseltiner 2013-03-20 11:52:45 -04:00
parent 6e883c730e
commit e2abecd3ab
13 changed files with 100 additions and 100 deletions

View file

@ -33,13 +33,13 @@ macro_rules! interner_key (
// table and a SyntaxContext to track renaming and // table and a SyntaxContext to track renaming and
// macro expansion per Flatt et al., "Macros // macro expansion per Flatt et al., "Macros
// That Work Together" // That Work Together"
#[deriving_eq] #[deriving(Eq)]
pub struct ident { repr: Name } pub struct ident { repr: Name }
// a SyntaxContext represents a chain of macro-expandings // a SyntaxContext represents a chain of macro-expandings
// and renamings. Each macro expansion corresponds to // and renamings. Each macro expansion corresponds to
// a fresh uint // a fresh uint
#[deriving_eq] #[deriving(Eq)]
pub enum SyntaxContext { pub enum SyntaxContext {
MT, MT,
Mark (Mrk,~SyntaxContext), Mark (Mrk,~SyntaxContext),
@ -98,7 +98,7 @@ pub type fn_ident = Option<ident>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct Lifetime { pub struct Lifetime {
id: node_id, id: node_id,
span: span, span: span,
@ -111,7 +111,7 @@ pub struct Lifetime {
// of supporting information. // of supporting information.
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct path { pub struct path {
span: span, span: span,
global: bool, global: bool,
@ -126,7 +126,7 @@ pub type node_id = int;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct def_id { pub struct def_id {
crate: crate_num, crate: crate_num,
node: node_id, node: node_id,
@ -137,7 +137,7 @@ pub const crate_node_id: node_id = 0;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
// The AST represents all type param bounds as types. // The AST represents all type param bounds as types.
// typeck::collect::compute_bounds matches these against // typeck::collect::compute_bounds matches these against
// the "special" built-in traits (see middle::lang_items) and // the "special" built-in traits (see middle::lang_items) and
@ -149,7 +149,7 @@ pub enum TyParamBound {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct TyParam { pub struct TyParam {
ident: ident, ident: ident,
id: node_id, id: node_id,
@ -158,7 +158,7 @@ pub struct TyParam {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct Generics { pub struct Generics {
lifetimes: OptVec<Lifetime>, lifetimes: OptVec<Lifetime>,
ty_params: OptVec<TyParam> ty_params: OptVec<TyParam>
@ -178,7 +178,7 @@ pub impl Generics {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum def { pub enum def {
def_fn(def_id, purity), def_fn(def_id, purity),
def_static_method(/* method */ def_id, def_static_method(/* method */ def_id,
@ -216,7 +216,7 @@ pub type crate = spanned<crate_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct crate_ { pub struct crate_ {
module: _mod, module: _mod,
attrs: ~[attribute], attrs: ~[attribute],
@ -227,7 +227,7 @@ pub type meta_item = spanned<meta_item_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum meta_item_ { pub enum meta_item_ {
meta_word(@~str), meta_word(@~str),
meta_list(@~str, ~[@meta_item]), meta_list(@~str, ~[@meta_item]),
@ -238,7 +238,7 @@ pub type blk = spanned<blk_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct blk_ { pub struct blk_ {
view_items: ~[@view_item], view_items: ~[@view_item],
stmts: ~[@stmt], stmts: ~[@stmt],
@ -249,7 +249,7 @@ pub struct blk_ {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct pat { pub struct pat {
id: node_id, id: node_id,
node: pat_, node: pat_,
@ -258,7 +258,7 @@ pub struct pat {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct field_pat { pub struct field_pat {
ident: ident, ident: ident,
pat: @pat, pat: @pat,
@ -266,7 +266,7 @@ pub struct field_pat {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum binding_mode { pub enum binding_mode {
bind_by_copy, bind_by_copy,
bind_by_ref(mutability), bind_by_ref(mutability),
@ -289,7 +289,7 @@ impl to_bytes::IterBytes for binding_mode {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum pat_ { pub enum pat_ {
pat_wild, pat_wild,
// A pat_ident may either be a new bound variable, // A pat_ident may either be a new bound variable,
@ -316,7 +316,7 @@ pub enum pat_ {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum mutability { m_mutbl, m_imm, m_const, } pub enum mutability { m_mutbl, m_imm, m_const, }
impl to_bytes::IterBytes for mutability { impl to_bytes::IterBytes for mutability {
@ -327,7 +327,7 @@ impl to_bytes::IterBytes for mutability {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum Abi { pub enum Abi {
RustAbi RustAbi
} }
@ -348,7 +348,7 @@ impl ToStr for Abi {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum Sigil { pub enum Sigil {
BorrowedSigil, BorrowedSigil,
OwnedSigil, OwnedSigil,
@ -373,7 +373,7 @@ impl ToStr for Sigil {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum vstore { pub enum vstore {
// FIXME (#3469): Change uint to @expr (actually only constant exprs) // FIXME (#3469): Change uint to @expr (actually only constant exprs)
vstore_fixed(Option<uint>), // [1,2,3,4] vstore_fixed(Option<uint>), // [1,2,3,4]
@ -384,7 +384,7 @@ pub enum vstore {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum expr_vstore { pub enum expr_vstore {
expr_vstore_fixed(Option<uint>), // [1,2,3,4] expr_vstore_fixed(Option<uint>), // [1,2,3,4]
expr_vstore_uniq, // ~[1,2,3,4] expr_vstore_uniq, // ~[1,2,3,4]
@ -396,7 +396,7 @@ pub enum expr_vstore {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum binop { pub enum binop {
add, add,
subtract, subtract,
@ -420,7 +420,7 @@ pub enum binop {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum unop { pub enum unop {
box(mutability), box(mutability),
uniq(mutability), uniq(mutability),
@ -433,7 +433,7 @@ pub enum unop {
// using ty::resolved_T(...). // using ty::resolved_T(...).
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum inferable<T> { pub enum inferable<T> {
expl(T), expl(T),
infer(node_id) infer(node_id)
@ -454,7 +454,7 @@ impl<T:to_bytes::IterBytes> to_bytes::IterBytes for inferable<T> {
// "resolved" mode: the real modes. // "resolved" mode: the real modes.
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum rmode { by_ref, by_copy } pub enum rmode { by_ref, by_copy }
impl to_bytes::IterBytes for rmode { impl to_bytes::IterBytes for rmode {
@ -470,7 +470,7 @@ pub type stmt = spanned<stmt_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum stmt_ { pub enum stmt_ {
stmt_decl(@decl, node_id), stmt_decl(@decl, node_id),
@ -488,7 +488,7 @@ pub enum stmt_ {
// a refinement on pat. // a refinement on pat.
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct local_ { pub struct local_ {
is_mutbl: bool, is_mutbl: bool,
ty: @Ty, ty: @Ty,
@ -503,12 +503,12 @@ pub type decl = spanned<decl_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum decl_ { decl_local(~[@local]), decl_item(@item), } pub enum decl_ { decl_local(~[@local]), decl_item(@item), }
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct arm { pub struct arm {
pats: ~[@pat], pats: ~[@pat],
guard: Option<@expr>, guard: Option<@expr>,
@ -517,7 +517,7 @@ pub struct arm {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct field_ { pub struct field_ {
mutbl: mutability, mutbl: mutability,
ident: ident, ident: ident,
@ -528,12 +528,12 @@ pub type field = spanned<field_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum blk_check_mode { default_blk, unsafe_blk, } pub enum blk_check_mode { default_blk, unsafe_blk, }
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct expr { pub struct expr {
id: node_id, id: node_id,
// Extra node ID is only used for index, assign_op, unary, binary, method // Extra node ID is only used for index, assign_op, unary, binary, method
@ -545,13 +545,13 @@ pub struct expr {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum log_level { error, debug, log_other } pub enum log_level { error, debug, log_other }
// 0 = error, 1 = debug, 2 = log_other // 0 = error, 1 = debug, 2 = log_other
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum CallSugar { pub enum CallSugar {
NoSugar, NoSugar,
DoSugar, DoSugar,
@ -560,7 +560,7 @@ pub enum CallSugar {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum expr_ { pub enum expr_ {
expr_vstore(@expr, expr_vstore), expr_vstore(@expr, expr_vstore),
expr_vec(~[@expr], mutability), expr_vec(~[@expr], mutability),
@ -634,7 +634,7 @@ pub enum expr_ {
// //
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
#[doc="For macro invocations; parsing is delegated to the macro"] #[doc="For macro invocations; parsing is delegated to the macro"]
pub enum token_tree { pub enum token_tree {
// a single token // a single token
@ -709,7 +709,7 @@ pub type matcher = spanned<matcher_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum matcher_ { pub enum matcher_ {
// match one token // match one token
match_tok(::parse::token::Token), match_tok(::parse::token::Token),
@ -724,7 +724,7 @@ pub type mac = spanned<mac_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum mac_ { pub enum mac_ {
mac_invoc_tt(@path,~[token_tree]), // new macro-invocation mac_invoc_tt(@path,~[token_tree]), // new macro-invocation
} }
@ -733,7 +733,7 @@ pub type lit = spanned<lit_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum lit_ { pub enum lit_ {
lit_str(@~str), lit_str(@~str),
lit_int(i64, int_ty), lit_int(i64, int_ty),
@ -749,7 +749,7 @@ pub enum lit_ {
// type structure in middle/ty.rs as well. // type structure in middle/ty.rs as well.
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct mt { pub struct mt {
ty: @Ty, ty: @Ty,
mutbl: mutability, mutbl: mutability,
@ -757,7 +757,7 @@ pub struct mt {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct ty_field_ { pub struct ty_field_ {
ident: ident, ident: ident,
mt: mt, mt: mt,
@ -767,7 +767,7 @@ pub type ty_field = spanned<ty_field_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct ty_method { pub struct ty_method {
ident: ident, ident: ident,
attrs: ~[attribute], attrs: ~[attribute],
@ -781,7 +781,7 @@ pub struct ty_method {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
// A trait method is either required (meaning it doesn't have an // A trait method is either required (meaning it doesn't have an
// implementation, just a signature) or provided (meaning it has a default // implementation, just a signature) or provided (meaning it has a default
// implementation). // implementation).
@ -792,7 +792,7 @@ pub enum trait_method {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum int_ty { ty_i, ty_char, ty_i8, ty_i16, ty_i32, ty_i64, } pub enum int_ty { ty_i, ty_char, ty_i8, ty_i16, ty_i32, ty_i64, }
impl ToStr for int_ty { impl ToStr for int_ty {
@ -809,7 +809,7 @@ impl to_bytes::IterBytes for int_ty {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum uint_ty { ty_u, ty_u8, ty_u16, ty_u32, ty_u64, } pub enum uint_ty { ty_u, ty_u8, ty_u16, ty_u32, ty_u64, }
impl ToStr for uint_ty { impl ToStr for uint_ty {
@ -826,7 +826,7 @@ impl to_bytes::IterBytes for uint_ty {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum float_ty { ty_f, ty_f32, ty_f64, } pub enum float_ty { ty_f, ty_f32, ty_f64, }
impl ToStr for float_ty { impl ToStr for float_ty {
@ -844,7 +844,7 @@ impl to_bytes::IterBytes for float_ty {
// NB Eq method appears below. // NB Eq method appears below.
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct Ty { pub struct Ty {
id: node_id, id: node_id,
node: ty_, node: ty_,
@ -854,7 +854,7 @@ pub struct Ty {
// Not represented directly in the AST, referred to by name through a ty_path. // Not represented directly in the AST, referred to by name through a ty_path.
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum prim_ty { pub enum prim_ty {
ty_int(int_ty), ty_int(int_ty),
ty_uint(uint_ty), ty_uint(uint_ty),
@ -865,7 +865,7 @@ pub enum prim_ty {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum Onceness { pub enum Onceness {
Once, Once,
Many Many
@ -888,7 +888,7 @@ impl to_bytes::IterBytes for Onceness {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct TyClosure { pub struct TyClosure {
sigil: Sigil, sigil: Sigil,
region: Option<@Lifetime>, region: Option<@Lifetime>,
@ -899,7 +899,7 @@ pub struct TyClosure {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct TyBareFn { pub struct TyBareFn {
purity: purity, purity: purity,
abi: Abi, abi: Abi,
@ -908,7 +908,7 @@ pub struct TyBareFn {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum ty_ { pub enum ty_ {
ty_nil, ty_nil,
ty_bot, /* bottom type */ ty_bot, /* bottom type */
@ -937,7 +937,7 @@ impl to_bytes::IterBytes for Ty {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct arg { pub struct arg {
mode: mode, mode: mode,
is_mutbl: bool, is_mutbl: bool,
@ -948,7 +948,7 @@ pub struct arg {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct fn_decl { pub struct fn_decl {
inputs: ~[arg], inputs: ~[arg],
output: @Ty, output: @Ty,
@ -957,7 +957,7 @@ pub struct fn_decl {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum purity { pub enum purity {
pure_fn, // declared with "pure fn" pure_fn, // declared with "pure fn"
unsafe_fn, // declared with "unsafe fn" unsafe_fn, // declared with "unsafe fn"
@ -984,7 +984,7 @@ impl to_bytes::IterBytes for purity {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum ret_style { pub enum ret_style {
noreturn, // functions with return type _|_ that always noreturn, // functions with return type _|_ that always
// raise an error or exit (i.e. never return to the caller) // raise an error or exit (i.e. never return to the caller)
@ -999,7 +999,7 @@ impl to_bytes::IterBytes for ret_style {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum self_ty_ { pub enum self_ty_ {
sty_static, // no self sty_static, // no self
sty_by_ref, // `` sty_by_ref, // ``
@ -1022,7 +1022,7 @@ pub type self_ty = spanned<self_ty_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct method { pub struct method {
ident: ident, ident: ident,
attrs: ~[attribute], attrs: ~[attribute],
@ -1039,7 +1039,7 @@ pub struct method {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct _mod { pub struct _mod {
view_items: ~[@view_item], view_items: ~[@view_item],
items: ~[@item], items: ~[@item],
@ -1047,7 +1047,7 @@ pub struct _mod {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum foreign_abi { pub enum foreign_abi {
foreign_abi_rust_intrinsic, foreign_abi_rust_intrinsic,
foreign_abi_cdecl, foreign_abi_cdecl,
@ -1057,12 +1057,12 @@ pub enum foreign_abi {
// Foreign mods can be named or anonymous // Foreign mods can be named or anonymous
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum foreign_mod_sort { named, anonymous } pub enum foreign_mod_sort { named, anonymous }
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct foreign_mod { pub struct foreign_mod {
sort: foreign_mod_sort, sort: foreign_mod_sort,
abi: ident, abi: ident,
@ -1072,7 +1072,7 @@ pub struct foreign_mod {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct variant_arg { pub struct variant_arg {
ty: @Ty, ty: @Ty,
id: node_id, id: node_id,
@ -1080,7 +1080,7 @@ pub struct variant_arg {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum variant_kind { pub enum variant_kind {
tuple_variant_kind(~[variant_arg]), tuple_variant_kind(~[variant_arg]),
struct_variant_kind(@struct_def), struct_variant_kind(@struct_def),
@ -1089,7 +1089,7 @@ pub enum variant_kind {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct enum_def { pub struct enum_def {
variants: ~[variant], variants: ~[variant],
common: Option<@struct_def>, common: Option<@struct_def>,
@ -1097,7 +1097,7 @@ pub struct enum_def {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct variant_ { pub struct variant_ {
name: ident, name: ident,
attrs: ~[attribute], attrs: ~[attribute],
@ -1111,7 +1111,7 @@ pub type variant = spanned<variant_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct path_list_ident_ { pub struct path_list_ident_ {
name: ident, name: ident,
id: node_id, id: node_id,
@ -1121,14 +1121,14 @@ pub type path_list_ident = spanned<path_list_ident_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum namespace { module_ns, type_value_ns } pub enum namespace { module_ns, type_value_ns }
pub type view_path = spanned<view_path_>; pub type view_path = spanned<view_path_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum view_path_ { pub enum view_path_ {
// quux = foo::bar::baz // quux = foo::bar::baz
@ -1147,7 +1147,7 @@ pub enum view_path_ {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct view_item { pub struct view_item {
node: view_item_, node: view_item_,
attrs: ~[attribute], attrs: ~[attribute],
@ -1157,7 +1157,7 @@ pub struct view_item {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum view_item_ { pub enum view_item_ {
view_item_extern_mod(ident, ~[@meta_item], node_id), view_item_extern_mod(ident, ~[@meta_item], node_id),
view_item_use(~[@view_path]), view_item_use(~[@view_path]),
@ -1171,13 +1171,13 @@ pub type attribute = spanned<attribute_>;
// distinguished for pretty-printing. // distinguished for pretty-printing.
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum attr_style { attr_outer, attr_inner, } pub enum attr_style { attr_outer, attr_inner, }
// doc-comments are promoted to attributes that have is_sugared_doc = true // doc-comments are promoted to attributes that have is_sugared_doc = true
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct attribute_ { pub struct attribute_ {
style: attr_style, style: attr_style,
value: @meta_item, value: @meta_item,
@ -1193,7 +1193,7 @@ pub struct attribute_ {
*/ */
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct trait_ref { pub struct trait_ref {
path: @path, path: @path,
ref_id: node_id, ref_id: node_id,
@ -1201,12 +1201,12 @@ pub struct trait_ref {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum visibility { public, private, inherited } pub enum visibility { public, private, inherited }
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct struct_field_ { pub struct struct_field_ {
kind: struct_field_kind, kind: struct_field_kind,
id: node_id, id: node_id,
@ -1217,7 +1217,7 @@ pub type struct_field = spanned<struct_field_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum struct_field_kind { pub enum struct_field_kind {
named_field(ident, struct_mutability, visibility), named_field(ident, struct_mutability, visibility),
unnamed_field // element of a tuple-like struct unnamed_field // element of a tuple-like struct
@ -1225,7 +1225,7 @@ pub enum struct_field_kind {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct struct_def { pub struct struct_def {
fields: ~[@struct_field], /* fields */ fields: ~[@struct_field], /* fields */
/* (not including ctor or dtor) */ /* (not including ctor or dtor) */
@ -1242,7 +1242,7 @@ pub struct struct_def {
*/ */
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct item { pub struct item {
ident: ident, ident: ident,
attrs: ~[attribute], attrs: ~[attribute],
@ -1254,7 +1254,7 @@ pub struct item {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum item_ { pub enum item_ {
item_const(@Ty, @expr), item_const(@Ty, @expr),
item_fn(fn_decl, purity, Generics, blk), item_fn(fn_decl, purity, Generics, blk),
@ -1274,7 +1274,7 @@ pub enum item_ {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum struct_mutability { struct_mutable, struct_immutable } pub enum struct_mutability { struct_mutable, struct_immutable }
impl to_bytes::IterBytes for struct_mutability { impl to_bytes::IterBytes for struct_mutability {
@ -1287,7 +1287,7 @@ pub type struct_dtor = spanned<struct_dtor_>;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct struct_dtor_ { pub struct struct_dtor_ {
id: node_id, id: node_id,
attrs: ~[attribute], attrs: ~[attribute],
@ -1297,7 +1297,7 @@ pub struct struct_dtor_ {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct foreign_item { pub struct foreign_item {
ident: ident, ident: ident,
attrs: ~[attribute], attrs: ~[attribute],
@ -1309,7 +1309,7 @@ pub struct foreign_item {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum foreign_item_ { pub enum foreign_item_ {
foreign_item_fn(fn_decl, purity, Generics), foreign_item_fn(fn_decl, purity, Generics),
foreign_item_const(@Ty) foreign_item_const(@Ty)
@ -1320,7 +1320,7 @@ pub enum foreign_item_ {
// that we trans. // that we trans.
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum inlined_item { pub enum inlined_item {
ii_item(@item), ii_item(@item),
ii_method(def_id /* impl id */, @method), ii_method(def_id /* impl id */, @method),

View file

@ -582,7 +582,7 @@ pub fn variant_visibility_to_privacy(visibility: visibility,
} }
} }
#[deriving_eq] #[deriving(Eq)]
pub enum Privacy { pub enum Privacy {
Private, Private,
Public Public

View file

@ -128,7 +128,7 @@ pub struct span {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub struct spanned<T> { node: T, span: span } pub struct spanned<T> { node: T, span: span }
impl cmp::Eq for span { impl cmp::Eq for span {

View file

@ -160,7 +160,7 @@ pub fn mk_handler(emitter: Option<Emitter>) -> @handler {
@mut HandlerT { err_count: 0, emit: emit } as @handler @mut HandlerT { err_count: 0, emit: emit } as @handler
} }
#[deriving_eq] #[deriving(Eq)]
pub enum level { pub enum level {
fatal, fatal,
error, error,

View file

@ -1204,7 +1204,7 @@ mod test {
use std::serialize::Encoder; use std::serialize::Encoder;
// just adding the ones I want to test, for now: // just adding the ones I want to test, for now:
#[deriving_eq] #[deriving(Eq)]
pub enum call { pub enum call {
CallToEmitEnum(~str), CallToEmitEnum(~str),
CallToEmitEnumVariant(~str, uint, uint), CallToEmitEnumVariant(~str, uint, uint),

View file

@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
/// The compiler code necessary to implement the #[deriving_eq] and /// The compiler code necessary to implement the #[deriving(Eq)] and
/// #[deriving_iter_bytes] extensions. /// #[deriving(IterBytes)] extensions.
use core::prelude::*; use core::prelude::*;

View file

@ -17,7 +17,7 @@ use ext::pipes::ast_builder::{append_types, ext_ctxt_ast_builder, path};
use core::to_str::ToStr; use core::to_str::ToStr;
#[deriving_eq] #[deriving(Eq)]
pub enum direction { send, recv } pub enum direction { send, recv }
impl ToStr for direction { impl ToStr for direction {

View file

@ -106,7 +106,7 @@ impl<T:Copy> OptVec<T> {
impl<A:Eq> Eq for OptVec<A> { impl<A:Eq> Eq for OptVec<A> {
pure fn eq(&self, other: &OptVec<A>) -> bool { 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. // (Empty, Vec(~[])) ought to be equal.
match (self, other) { match (self, other) {
(&Empty, &Empty) => true, (&Empty, &Empty) => true,

View file

@ -37,7 +37,7 @@ pub trait reader {
fn dup(@mut self) -> @reader; fn dup(@mut self) -> @reader;
} }
#[deriving_eq] #[deriving(Eq)]
pub struct TokenAndSpan {tok: token::Token, sp: span} pub struct TokenAndSpan {tok: token::Token, sp: span}
pub struct StringReader { pub struct StringReader {

View file

@ -30,7 +30,7 @@ use core::str;
use core::to_bytes; use core::to_bytes;
/// The specific types of unsupported syntax /// The specific types of unsupported syntax
#[deriving_eq] #[deriving(Eq)]
pub enum ObsoleteSyntax { pub enum ObsoleteSyntax {
ObsoleteLowerCaseKindBounds, ObsoleteLowerCaseKindBounds,
ObsoleteLet, ObsoleteLet,

View file

@ -93,7 +93,7 @@ use core::either;
use core::vec; use core::vec;
use std::oldmap::HashMap; use std::oldmap::HashMap;
#[deriving_eq] #[deriving(Eq)]
enum restriction { enum restriction {
UNRESTRICTED, UNRESTRICTED,
RESTRICT_STMT_EXPR, RESTRICT_STMT_EXPR,

View file

@ -24,7 +24,7 @@ use std::oldmap::HashMap;
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum binop { pub enum binop {
PLUS, PLUS,
MINUS, MINUS,
@ -40,7 +40,7 @@ pub enum binop {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
pub enum Token { pub enum Token {
/* Expression-operator symbols. */ /* Expression-operator symbols. */
EQ, EQ,
@ -103,7 +103,7 @@ pub enum Token {
#[auto_encode] #[auto_encode]
#[auto_decode] #[auto_decode]
#[deriving_eq] #[deriving(Eq)]
/// For interpolation during macro expansion. /// For interpolation during macro expansion.
pub enum nonterminal { pub enum nonterminal {
nt_item(@ast::item), nt_item(@ast::item),

View file

@ -66,7 +66,7 @@ use core::vec;
* line (which it can't) and so naturally place the content on its own line to * 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. * avoid combining it with other lines and making matters even worse.
*/ */
#[deriving_eq] #[deriving(Eq)]
pub enum breaks { consistent, inconsistent, } pub enum breaks { consistent, inconsistent, }
pub struct break_t { pub struct break_t {