diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs index b7c4e26c4b15c..55d9f467f79e2 100644 --- a/src/compiletest/common.rs +++ b/src/compiletest/common.rs @@ -10,7 +10,7 @@ use core::prelude::*; -#[deriving_eq] +#[deriving(Eq)] pub enum mode { mode_compile_fail, mode_run_fail, diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 25778f08757c3..fc8ed5d70c33d 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -37,7 +37,7 @@ pub trait Eq { pure fn ne(&self, other: &Self) -> bool; } -#[deriving_eq] +#[deriving(Eq)] pub enum Ordering { Less, Equal, Greater } /// Trait for types that form a total order diff --git a/src/libcore/either.rs b/src/libcore/either.rs index 2410ef3933277..a036c19c1580e 100644 --- a/src/libcore/either.rs +++ b/src/libcore/either.rs @@ -17,7 +17,7 @@ use result; use vec; /// The either type -#[deriving_eq] +#[deriving(Eq)] pub enum Either { Left(T), Right(U) diff --git a/src/libcore/io.rs b/src/libcore/io.rs index b160da359f8d3..94e06924e6957 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -630,7 +630,7 @@ pub pure fn with_str_reader(s: &str, f: &fn(@Reader) -> T) -> T { pub enum FileFlag { Append, Create, Truncate, NoFlag, } // What type of writer are we? -#[deriving_eq] +#[deriving(Eq)] pub enum WriterType { Screen, File } // FIXME (#2004): Seekable really should be orthogonal. diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 8103166909c7f..c12b78b393f65 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -52,7 +52,7 @@ use iter::{BaseIter, MutableIter}; #[cfg(test)] use str; /// The option type -#[deriving_eq] +#[deriving(Eq)] pub enum Option { None, Some(T), diff --git a/src/libcore/path.rs b/src/libcore/path.rs index bc6d6b507b202..df4a3fdfb9e4a 100644 --- a/src/libcore/path.rs +++ b/src/libcore/path.rs @@ -20,7 +20,7 @@ use option::{None, Option, Some}; use str; use to_str::ToStr; -#[deriving_eq] +#[deriving(Eq)] pub struct WindowsPath { host: Option<~str>, device: Option<~str>, @@ -32,7 +32,7 @@ pub pure fn WindowsPath(s: &str) -> WindowsPath { GenericPath::from_str(s) } -#[deriving_eq] +#[deriving(Eq)] pub struct PosixPath { is_absolute: bool, components: ~[~str], diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 832071a0ba81b..18594a73d65ed 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -20,7 +20,7 @@ use option::{None, Option, Some}; use vec; /// The result type -#[deriving_eq] +#[deriving(Eq)] pub enum Result { /// Contains the successful result value Ok(T), diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs index 31c44531efec0..1ef2316ec07af 100644 --- a/src/libcore/task/mod.rs +++ b/src/libcore/task/mod.rs @@ -50,13 +50,13 @@ pub mod rt; pub mod spawn; /// A handle to a scheduler -#[deriving_eq] +#[deriving(Eq)] pub enum Scheduler { SchedulerHandle(sched_id) } /// A handle to a task -#[deriving_eq] +#[deriving(Eq)] pub enum Task { TaskHandle(task_id) } @@ -88,7 +88,7 @@ impl Eq for TaskResult { } /// Scheduler modes -#[deriving_eq] +#[deriving(Eq)] pub enum SchedMode { /// Run task on the default scheduler DefaultScheduler, diff --git a/src/libcore/unstable/extfmt.rs b/src/libcore/unstable/extfmt.rs index a5c22fe0ad303..28f810c3a2871 100644 --- a/src/libcore/unstable/extfmt.rs +++ b/src/libcore/unstable/extfmt.rs @@ -97,13 +97,13 @@ pub mod ct { use prelude::*; use str; - #[deriving_eq] + #[deriving(Eq)] pub enum Signedness { Signed, Unsigned, } - #[deriving_eq] + #[deriving(Eq)] pub enum Caseness { CaseUpper, CaseLower, } - #[deriving_eq] + #[deriving(Eq)] pub enum Ty { TyBool, TyStr, @@ -116,7 +116,7 @@ pub mod ct { TyPoly, } - #[deriving_eq] + #[deriving(Eq)] pub enum Flag { FlagLeftJustify, FlagLeftZeroPad, @@ -125,7 +125,7 @@ pub mod ct { FlagAlternate, } - #[deriving_eq] + #[deriving(Eq)] pub enum Count { CountIs(uint), CountIsParam(uint), @@ -133,7 +133,7 @@ pub mod ct { CountImplied, } - #[deriving_eq] + #[deriving(Eq)] struct Parsed { val: T, next: uint @@ -146,7 +146,7 @@ pub mod ct { } // A formatted conversion from an expression to a string - #[deriving_eq] + #[deriving(Eq)] pub struct Conv { param: Option, flags: ~[Flag], @@ -156,7 +156,7 @@ pub mod ct { } // A fragment of the output sequence - #[deriving_eq] + #[deriving(Eq)] pub enum Piece { PieceString(~str), PieceConv(Conv), } pub type ErrorFn = @fn(&str) -> !; @@ -596,7 +596,7 @@ pub mod rt { }; } - #[deriving_eq] + #[deriving(Eq)] pub enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat } pub fn pad(cv: Conv, s: ~str, mode: PadMode) -> ~str { diff --git a/src/libfuzzer/fuzzer.rc b/src/libfuzzer/fuzzer.rc index 3a2bbcee4b0a6..21015a767b715 100644 --- a/src/libfuzzer/fuzzer.rc +++ b/src/libfuzzer/fuzzer.rc @@ -39,7 +39,7 @@ use syntax::parse; use syntax::print::pprust; use syntax::diagnostic; -#[deriving_eq] +#[deriving(Eq)] pub enum test_mode { tm_converge, tm_run, } pub struct Context { mode: test_mode } // + rng diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index 4c8f27167816e..5f9a3e606f201 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -38,7 +38,7 @@ use syntax::ast_map::{path, path_mod, path_name}; use syntax::attr; use syntax::print::pprust; -#[deriving_eq] +#[deriving(Eq)] pub enum output_type { output_type_none, output_type_bitcode, diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs index b983fa316d304..a4fdd7f1b5249 100644 --- a/src/librustc/driver/driver.rs +++ b/src/librustc/driver/driver.rs @@ -161,7 +161,7 @@ pub fn parse_input(sess: Session, +cfg: ast::crate_cfg, input: input) } } -#[deriving_eq] +#[deriving(Eq)] pub enum compile_upto { cu_parse, cu_expand, diff --git a/src/librustc/driver/session.rs b/src/librustc/driver/session.rs index 75400c5e3244c..caf4689688b10 100644 --- a/src/librustc/driver/session.rs +++ b/src/librustc/driver/session.rs @@ -27,10 +27,10 @@ use syntax::parse::ParseSess; use syntax::{ast, codemap}; use syntax; -#[deriving_eq] +#[deriving(Eq)] pub enum os { os_win32, os_macos, os_linux, os_android, os_freebsd, } -#[deriving_eq] +#[deriving(Eq)] pub enum arch { arch_x86, arch_x86_64, arch_arm, arch_mips, } pub enum crate_type { bin_crate, lib_crate, unknown_crate, } @@ -104,7 +104,7 @@ pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] { ] } -#[deriving_eq] +#[deriving(Eq)] pub enum OptLevel { No, // -O0 Less, // -O1 diff --git a/src/librustc/lib/llvm.rs b/src/librustc/lib/llvm.rs index e5234dff91d13..5cdfe6a49f723 100644 --- a/src/librustc/lib/llvm.rs +++ b/src/librustc/lib/llvm.rs @@ -127,7 +127,7 @@ pub enum RealPredicate { // enum for the LLVM TypeKind type - must stay in sync with the def of // LLVMTypeKind in llvm/include/llvm-c/Core.h -#[deriving_eq] +#[deriving(Eq)] pub enum TypeKind { Void = 0, Half = 1, diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs index 292a11062613d..655bfc4446ec8 100644 --- a/src/librustc/metadata/decoder.rs +++ b/src/librustc/metadata/decoder.rs @@ -93,7 +93,7 @@ fn lookup_item(item_id: int, data: @~[u8]) -> ebml::Doc { } } -#[deriving_eq] +#[deriving(Eq)] enum Family { Const, // c Fn, // f diff --git a/src/librustc/middle/borrowck/check_loans.rs b/src/librustc/middle/borrowck/check_loans.rs index 17bdf318e0708..6dfcf6ddf9168 100644 --- a/src/librustc/middle/borrowck/check_loans.rs +++ b/src/librustc/middle/borrowck/check_loans.rs @@ -51,7 +51,7 @@ struct CheckLoanCtxt { } // if we are enforcing purity, why are we doing so? -#[deriving_eq] +#[deriving(Eq)] enum purity_cause { // enforcing purity because fn was declared pure: pc_pure_fn, @@ -80,7 +80,7 @@ pub fn check_loans(bccx: @BorrowckCtxt, visit::visit_crate(*crate, clcx, vt); } -#[deriving_eq] +#[deriving(Eq)] enum assignment_type { at_straight_up, at_swap diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs index 3e63707162417..daa365aade125 100644 --- a/src/librustc/middle/borrowck/mod.rs +++ b/src/librustc/middle/borrowck/mod.rs @@ -340,7 +340,7 @@ pub type root_map = HashMap; // if you have an expression `x.f` and x has type ~@T, we could add an // entry {id:x, derefs:0} to refer to `x` itself, `{id:x, derefs:1}` // to refer to the deref of the unique pointer, and so on. -#[deriving_eq] +#[deriving(Eq)] pub struct root_map_key { id: ast::node_id, derefs: uint @@ -355,7 +355,7 @@ pub type mutbl_map = HashMap; pub type write_guard_map = HashMap; // Errors that can occur -#[deriving_eq] +#[deriving(Eq)] pub enum bckerr_code { err_mut_uniq, err_mut_variant, @@ -367,7 +367,7 @@ pub enum bckerr_code { // Combination of an error code and the categorization of the expression // that caused it -#[deriving_eq] +#[deriving(Eq)] pub struct bckerr { cmt: cmt, code: bckerr_code @@ -382,7 +382,7 @@ pub enum MoveError { // shorthand for something that fails with `bckerr` or succeeds with `T` pub type bckres = Result; -#[deriving_eq] +#[deriving(Eq)] pub enum LoanKind { TotalFreeze, // Entire path is frozen (borrowed as &T) PartialFreeze, // Some subpath is frozen (borrowed as &T) diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs index 24e94c7ca6d41..ddc00000c6b4f 100644 --- a/src/librustc/middle/check_match.rs +++ b/src/librustc/middle/check_match.rs @@ -183,7 +183,7 @@ pub type matrix = ~[~[@pat]]; pub enum useful { useful(ty::t, ctor), useful_, not_useful } -#[deriving_eq] +#[deriving(Eq)] pub enum ctor { single, variant(def_id), diff --git a/src/librustc/middle/const_eval.rs b/src/librustc/middle/const_eval.rs index ba6348bb1de81..7e0a36be0a020 100644 --- a/src/librustc/middle/const_eval.rs +++ b/src/librustc/middle/const_eval.rs @@ -240,7 +240,7 @@ pub fn process_crate(crate: @ast::crate, // FIXME (#33): this doesn't handle big integer/float literals correctly // (nor does the rest of our literal handling). -#[deriving_eq] +#[deriving(Eq)] pub enum const_val { const_float(f64), const_int(i64), diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index 3edceebba0cc0..c95ec0f30831d 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -60,7 +60,7 @@ use syntax::{ast, ast_util, visit}; * process. */ -#[deriving_eq] +#[deriving(Eq)] pub enum lint { ctypes, unused_imports, @@ -99,7 +99,7 @@ pub fn level_to_str(lv: level) -> &'static str { } } -#[deriving_eq] +#[deriving(Eq)] pub enum level { allow, warn, deny, forbid } diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs index a471d91877a62..d85570444d825 100644 --- a/src/librustc/middle/mem_categorization.rs +++ b/src/librustc/middle/mem_categorization.rs @@ -60,7 +60,7 @@ use syntax::ast; use syntax::codemap::span; use syntax::print::pprust; -#[deriving_eq] +#[deriving(Eq)] pub enum categorization { cat_rvalue, // result of eval'ing some misc expr cat_special(special_kind), // @@ -75,7 +75,7 @@ pub enum categorization { } // different kinds of pointers: -#[deriving_eq] +#[deriving(Eq)] pub enum ptr_kind { uniq_ptr, gc_ptr(ast::mutability), @@ -85,7 +85,7 @@ pub enum ptr_kind { // I am coining the term "components" to mean "pieces of a data // structure accessible without a dereference": -#[deriving_eq] +#[deriving(Eq)] pub enum comp_kind { comp_tuple, // elt in a tuple comp_anon_field, // anonymous field (in e.g. @@ -98,7 +98,7 @@ pub enum comp_kind { } // different kinds of expressions we might evaluate -#[deriving_eq] +#[deriving(Eq)] pub enum special_kind { sk_method, sk_static_item, @@ -106,7 +106,7 @@ pub enum special_kind { sk_heap_upvar } -#[deriving_eq] +#[deriving(Eq)] pub enum MutabilityCategory { McImmutable, // Immutable. McReadOnly, // Read-only (`const`) @@ -119,7 +119,7 @@ pub enum MutabilityCategory { // which the value is stored. // // note: cmt stands for "categorized mutable type". -#[deriving_eq] +#[deriving(Eq)] pub struct cmt_ { id: ast::node_id, // id of expr/pat producing this value span: span, // span of same expr/pat @@ -134,7 +134,7 @@ pub type cmt = @cmt_; // a loan path is like a category, but it exists only when the data is // interior to the stack frame. loan paths are used as the key to a // map indicating what is borrowed at any point in time. -#[deriving_eq] +#[deriving(Eq)] pub enum loan_path { lp_local(ast::node_id), lp_arg(ast::node_id), diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 6dcf1ba812863..10838a7a8dc2c 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -389,7 +389,7 @@ pub fn resolve_crate(sess: Session, pub type region_paramd_items = HashMap; -#[deriving_eq] +#[deriving(Eq)] pub struct region_dep { ambient_variance: region_variance, id: ast::node_id diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs index f0e7ef0c5899a..1d3a0f8b4b63d 100644 --- a/src/librustc/middle/resolve.rs +++ b/src/librustc/middle/resolve.rs @@ -122,7 +122,7 @@ pub struct Export2 { reexport: bool, // Whether this is a reexport. } -#[deriving_eq] +#[deriving(Eq)] pub enum PatternBindingMode { RefutableMode, LocalIrrefutableMode, @@ -166,7 +166,7 @@ pub enum NameDefinition { } -#[deriving_eq] +#[deriving(Eq)] pub enum Mutability { Mutable, Immutable @@ -179,7 +179,7 @@ pub enum SelfBinding { pub type ResolveVisitor = vt<()>; -#[deriving_eq] +#[deriving(Eq)] pub enum ImportDirectiveNS { TypeNSOnly, AnyNS @@ -271,7 +271,7 @@ pub enum MethodSort { // FIXME #4947: The X-ray flag is kind of questionable in the first // place. It might be better to introduce an expr_xray_path instead. -#[deriving_eq] +#[deriving(Eq)] pub enum XrayFlag { NoXray, //< Private items cannot be accessed. Xray //< Private items can be accessed. @@ -292,13 +292,13 @@ pub enum ModulePrefixResult { PrefixFound(@mut Module, uint) } -#[deriving_eq] +#[deriving(Eq)] pub enum AllowCapturingSelfFlag { AllowCapturingSelf, //< The "self" definition can be captured. DontAllowCapturingSelf, //< The "self" definition cannot be captured. } -#[deriving_eq] +#[deriving(Eq)] enum NameSearchType { SearchItemsAndPublicImports, //< Search items and public imports. SearchItemsAndAllImports, //< Search items and all imports. @@ -312,7 +312,7 @@ pub enum BareIdentifierPatternResolution { // Specifies how duplicates should be handled when adding a child item if // another item exists with the same name in some namespace. -#[deriving_eq] +#[deriving(Eq)] pub enum DuplicateCheckingMode { ForbidDuplicateModules, ForbidDuplicateTypes, diff --git a/src/librustc/middle/trans/_match.rs b/src/librustc/middle/trans/_match.rs index 09f0a4f547a03..a529fd669394a 100644 --- a/src/librustc/middle/trans/_match.rs +++ b/src/librustc/middle/trans/_match.rs @@ -1037,7 +1037,7 @@ pub fn pick_col(m: &[@Match]) -> uint { return best_col; } -#[deriving_eq] +#[deriving(Eq)] pub enum branch_kind { no_branch, single, switch, compare, compare_vec_len, } // Compiles a comparison between two things. diff --git a/src/librustc/middle/trans/common.rs b/src/librustc/middle/trans/common.rs index 8ffccff54b8d8..112d42d8f57e6 100644 --- a/src/librustc/middle/trans/common.rs +++ b/src/librustc/middle/trans/common.rs @@ -335,14 +335,14 @@ pub fn warn_not_to_commit(ccx: @CrateContext, msg: &str) { } // Heap selectors. Indicate which heap something should go on. -#[deriving_eq] +#[deriving(Eq)] pub enum heap { heap_managed, heap_managed_unique, heap_exchange, } -#[deriving_eq] +#[deriving(Eq)] pub enum cleantype { normal_exit_only, normal_exit_and_unwind @@ -1270,7 +1270,7 @@ pub fn is_undef(val: ValueRef) -> bool { } // Used to identify cached monomorphized functions and vtables -#[deriving_eq] +#[deriving(Eq)] pub enum mono_param_id { mono_precise(ty::t, Option<~[mono_id]>), mono_any, @@ -1280,7 +1280,7 @@ pub enum mono_param_id { datum::DatumMode), } -#[deriving_eq] +#[deriving(Eq)] pub struct mono_id_ { def: ast::def_id, params: ~[mono_param_id], diff --git a/src/librustc/middle/trans/datum.rs b/src/librustc/middle/trans/datum.rs index 9b3ec5ef842e6..08ed83a9634bb 100644 --- a/src/librustc/middle/trans/datum.rs +++ b/src/librustc/middle/trans/datum.rs @@ -110,7 +110,7 @@ use core::uint; use syntax::ast; use syntax::parse::token::special_idents; -#[deriving_eq] +#[deriving(Eq)] pub enum CopyAction { INIT, DROP_EXISTING @@ -171,7 +171,7 @@ impl to_bytes::IterBytes for DatumMode { } /// See `Datum cleanup styles` section at the head of this module. -#[deriving_eq] +#[deriving(Eq)] pub enum DatumCleanup { RevokeClean, ZeroMem diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index be5dd8af9d730..065942b8fe63b 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -54,13 +54,13 @@ use syntax; // Note: after typeck, you should use resolved_mode() to convert this mode // into an rmode, which will take into account the results of mode inference. -#[deriving_eq] +#[deriving(Eq)] pub struct arg { mode: ast::mode, ty: t } -#[deriving_eq] +#[deriving(Eq)] pub struct field { ident: ast::ident, mt: mt @@ -84,7 +84,7 @@ pub struct mt { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum vstore { vstore_fixed(uint), vstore_uniq, @@ -94,7 +94,7 @@ pub enum vstore { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum TraitStore { BareTraitStore, // a plain trait without a sigil BoxTraitStore, // @Trait @@ -111,7 +111,7 @@ pub struct field_ty { // Contains information needed to resolve types and (in the future) look up // the types of AST nodes. -#[deriving_eq] +#[deriving(Eq)] pub struct creader_cache_key { cnum: int, pos: uint, @@ -131,7 +131,7 @@ struct intern_key { o_def_id: Option } -// NB: Do not replace this with #[deriving_eq]. The automatically-derived +// NB: Do not replace this with #[deriving(Eq)]. The automatically-derived // implementation will not recurse through sty and you will get stack // exhaustion. impl cmp::Eq for intern_key { @@ -359,14 +359,14 @@ pub pure fn type_has_regions(t: t) -> bool { pub pure fn type_def_id(t: t) -> Option { get(t).o_def_id } pub pure fn type_id(t: t) -> uint { get(t).id } -#[deriving_eq] +#[deriving(Eq)] pub struct BareFnTy { purity: ast::purity, abi: Abi, sig: FnSig } -#[deriving_eq] +#[deriving(Eq)] pub struct ClosureTy { purity: ast::purity, sigil: ast::Sigil, @@ -381,7 +381,7 @@ pub struct ClosureTy { * * - `inputs` is the list of arguments and their modes. * - `output` is the return type. */ -#[deriving_eq] +#[deriving(Eq)] pub struct FnSig { inputs: ~[arg], output: t @@ -400,7 +400,7 @@ impl to_bytes::IterBytes for ClosureTy { } } -#[deriving_eq] +#[deriving(Eq)] pub struct param_ty { idx: uint, def_id: def_id @@ -489,7 +489,7 @@ type opt_region = Option; * - `self_ty` is the type to which `self` should be remapped, if any. The * `self` type is rather funny in that it can only appear on traits and is * always substituted away to the implementing type for a trait. */ -#[deriving_eq] +#[deriving(Eq)] pub struct substs { self_r: opt_region, self_ty: Option, @@ -498,7 +498,7 @@ pub struct substs { // NB: If you change this, you'll probably want to change the corresponding // AST structure in libsyntax/ast.rs as well. -#[deriving_eq] +#[deriving(Eq)] pub enum sty { ty_nil, ty_bot, @@ -535,7 +535,7 @@ pub enum sty { ty_unboxed_vec(mt), } -#[deriving_eq] +#[deriving(Eq)] pub enum IntVarValue { IntType(ast::int_ty), UintType(ast::uint_ty), @@ -592,23 +592,23 @@ pub enum param_bound { bound_trait(t), } -#[deriving_eq] +#[deriving(Eq)] pub struct TyVid(uint); -#[deriving_eq] +#[deriving(Eq)] pub struct IntVid(uint); -#[deriving_eq] +#[deriving(Eq)] pub struct FloatVid(uint); -#[deriving_eq] +#[deriving(Eq)] #[auto_encode] #[auto_decode] pub struct RegionVid { id: uint } -#[deriving_eq] +#[deriving(Eq)] pub enum InferTy { TyVar(TyVid), IntVar(IntVid), diff --git a/src/librustc/middle/typeck/check/method.rs b/src/librustc/middle/typeck/check/method.rs index adcc94086947a..2973492cac4b9 100644 --- a/src/librustc/middle/typeck/check/method.rs +++ b/src/librustc/middle/typeck/check/method.rs @@ -105,13 +105,13 @@ use syntax::ast::{m_const, m_mutbl, m_imm}; use syntax::ast; use syntax::ast_map; -#[deriving_eq] +#[deriving(Eq)] pub enum CheckTraitsFlag { CheckTraitsOnly, CheckTraitsAndInherentMethods, } -#[deriving_eq] +#[deriving(Eq)] pub enum AutoderefReceiverFlag { AutoderefReceiver, DontAutoderefReceiver, diff --git a/src/librustc/middle/typeck/infer/region_inference.rs b/src/librustc/middle/typeck/infer/region_inference.rs index 534e50e115f78..df309bcec2fa2 100644 --- a/src/librustc/middle/typeck/infer/region_inference.rs +++ b/src/librustc/middle/typeck/infer/region_inference.rs @@ -1175,10 +1175,10 @@ priv impl RegionVarBindings { // ______________________________________________________________________ -#[deriving_eq] +#[deriving(Eq)] enum Direction { Incoming = 0, Outgoing = 1 } -#[deriving_eq] +#[deriving(Eq)] enum Classification { Expanding, Contracting } enum GraphNodeValue { NoValue, Value(Region), ErrorValue } diff --git a/src/librustc/rustc.rc b/src/librustc/rustc.rc index 296c94f3299cb..60248687f3f98 100644 --- a/src/librustc/rustc.rc +++ b/src/librustc/rustc.rc @@ -286,7 +286,7 @@ pub fn run_compiler(args: &~[~str], demitter: diagnostic::Emitter) { compile_input(sess, cfg, input, &odir, &ofile); } -#[deriving_eq] +#[deriving(Eq)] pub enum monitor_msg { fatal, done, diff --git a/src/librustdoc/doc.rs b/src/librustdoc/doc.rs index ae45f54941730..43172fd22c0c3 100644 --- a/src/librustdoc/doc.rs +++ b/src/librustdoc/doc.rs @@ -19,18 +19,18 @@ use core::vec; pub type AstId = int; -#[deriving_eq] +#[deriving(Eq)] pub struct Doc { pages: ~[Page] } -#[deriving_eq] +#[deriving(Eq)] pub enum Page { CratePage(CrateDoc), ItemPage(ItemTag) } -#[deriving_eq] +#[deriving(Eq)] pub enum Implementation { Required, Provided, @@ -40,7 +40,7 @@ pub enum Implementation { * Most rustdocs can be parsed into 'sections' according to their markdown * headers */ -#[deriving_eq] +#[deriving(Eq)] pub struct Section { header: ~str, body: ~str @@ -49,12 +49,12 @@ pub struct Section { // FIXME (#2596): We currently give topmod the name of the crate. There // would probably be fewer special cases if the crate had its own name // and topmod's name was the empty string. -#[deriving_eq] +#[deriving(Eq)] pub struct CrateDoc { topmod: ModDoc } -#[deriving_eq] +#[deriving(Eq)] pub enum ItemTag { ModTag(ModDoc), NmodTag(NmodDoc), @@ -67,7 +67,7 @@ pub enum ItemTag { StructTag(StructDoc) } -#[deriving_eq] +#[deriving(Eq)] pub struct ItemDoc { id: AstId, name: ~str, @@ -79,20 +79,20 @@ pub struct ItemDoc { reexport: bool } -#[deriving_eq] +#[deriving(Eq)] pub struct SimpleItemDoc { item: ItemDoc, sig: Option<~str> } -#[deriving_eq] +#[deriving(Eq)] pub struct ModDoc { item: ItemDoc, items: ~[ItemTag], index: Option } -#[deriving_eq] +#[deriving(Eq)] pub struct NmodDoc { item: ItemDoc, fns: ~[FnDoc], @@ -103,26 +103,26 @@ pub type ConstDoc = SimpleItemDoc; pub type FnDoc = SimpleItemDoc; -#[deriving_eq] +#[deriving(Eq)] pub struct EnumDoc { item: ItemDoc, variants: ~[VariantDoc] } -#[deriving_eq] +#[deriving(Eq)] pub struct VariantDoc { name: ~str, desc: Option<~str>, sig: Option<~str> } -#[deriving_eq] +#[deriving(Eq)] pub struct TraitDoc { item: ItemDoc, methods: ~[MethodDoc] } -#[deriving_eq] +#[deriving(Eq)] pub struct MethodDoc { name: ~str, brief: Option<~str>, @@ -132,7 +132,7 @@ pub struct MethodDoc { implementation: Implementation, } -#[deriving_eq] +#[deriving(Eq)] pub struct ImplDoc { item: ItemDoc, trait_types: ~[~str], @@ -142,14 +142,14 @@ pub struct ImplDoc { pub type TyDoc = SimpleItemDoc; -#[deriving_eq] +#[deriving(Eq)] pub struct StructDoc { item: ItemDoc, fields: ~[~str], sig: Option<~str> } -#[deriving_eq] +#[deriving(Eq)] pub struct Index { entries: ~[IndexEntry] } @@ -164,7 +164,7 @@ pub struct Index { * * brief - The brief description * * link - A format-specific string representing the link target */ -#[deriving_eq] +#[deriving(Eq)] pub struct IndexEntry { kind: ~str, name: ~str, diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs index 18cf64b299f58..64d28dcde834c 100644 --- a/src/libstd/deque.rs +++ b/src/libstd/deque.rs @@ -253,15 +253,15 @@ mod tests { fail_unless!(*deq.get(3) == d); } - #[deriving_eq] + #[deriving(Eq)] enum Taggy { One(int), Two(int, int), Three(int, int, int), } - #[deriving_eq] + #[deriving(Eq)] enum Taggypar { Onepar(int), Twopar(int, int), Threepar(int, int, int), } - #[deriving_eq] + #[deriving(Eq)] struct RecCy { x: int, y: int, diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs index e2702b7d566c5..de8a8f343816c 100644 --- a/src/libstd/getopts.rs +++ b/src/libstd/getopts.rs @@ -86,20 +86,20 @@ use core::option::{Some, None}; use core::str; use core::vec; -#[deriving_eq] +#[deriving(Eq)] pub enum Name { Long(~str), Short(char), } -#[deriving_eq] +#[deriving(Eq)] pub enum HasArg { Yes, No, Maybe, } -#[deriving_eq] +#[deriving(Eq)] pub enum Occur { Req, Optional, Multi, } /// A description of a possible option -#[deriving_eq] +#[deriving(Eq)] pub struct Opt { name: Name, hasarg: HasArg, @@ -146,14 +146,14 @@ pub fn optmulti(name: &str) -> Opt { return Opt {name: mkname(name), hasarg: Yes, occur: Multi}; } -#[deriving_eq] +#[deriving(Eq)] enum Optval { Val(~str), Given, } /** * The result of checking command line arguments. Contains a vector * of matches and a vector of free strings. */ -#[deriving_eq] +#[deriving(Eq)] pub struct Matches { opts: ~[Opt], vals: ~[~[Optval]], @@ -179,7 +179,7 @@ fn find_opt(opts: &[Opt], nm: Name) -> Option { * The type returned when the command line does not conform to the * expected format. Pass this value to to get an error message. */ -#[deriving_eq] +#[deriving(Eq)] pub enum Fail_ { ArgumentMissing(~str), UnrecognizedOption(~str), @@ -446,7 +446,7 @@ pub fn opt_default(mm: &Matches, nm: &str, def: &str) -> Option<~str> { _ => Some::<~str>(str::from_slice(def)) } } -#[deriving_eq] +#[deriving(Eq)] pub enum FailType { ArgumentMissing_, UnrecognizedOption_, @@ -469,7 +469,7 @@ pub mod groups { /** one group of options, e.g., both -h and --help, along with * their shared description and properties */ - #[deriving_eq] + #[deriving(Eq)] pub struct OptGroup { short_name: ~str, long_name: ~str, diff --git a/src/libstd/list.rs b/src/libstd/list.rs index 3a0f299257e09..eb1c249be6950 100644 --- a/src/libstd/list.rs +++ b/src/libstd/list.rs @@ -15,7 +15,7 @@ use core::option::*; use core::prelude::*; use core::vec; -#[deriving_eq] +#[deriving(Eq)] pub enum List { Cons(T, @List), Nil, diff --git a/src/libstd/net_url.rs b/src/libstd/net_url.rs index 4943b374980a9..6fb4f6747a3ee 100644 --- a/src/libstd/net_url.rs +++ b/src/libstd/net_url.rs @@ -25,7 +25,7 @@ use core::to_str::ToStr; use core::to_str; use core::uint; -#[deriving_eq] +#[deriving(Eq)] struct Url { scheme: ~str, user: Option, @@ -36,7 +36,7 @@ struct Url { fragment: Option<~str> } -#[deriving_eq] +#[deriving(Eq)] struct UserInfo { user: ~str, pass: Option<~str> @@ -398,7 +398,7 @@ pub pure fn get_scheme(rawurl: &str) -> Result<(~str, ~str), ~str> { return Err(~"url: Scheme must be terminated with a colon."); } -#[deriving_eq] +#[deriving(Eq)] enum Input { Digit, // all digits Hex, // digits and letters a-f diff --git a/src/libstd/semver.rs b/src/libstd/semver.rs index e1e7f8ca92423..3593ccc5ae898 100644 --- a/src/libstd/semver.rs +++ b/src/libstd/semver.rs @@ -19,7 +19,7 @@ use core::str; use core::to_str::ToStr; use core::uint; -#[deriving_eq] +#[deriving(Eq)] pub enum Identifier { Numeric(uint), AlphaNumeric(~str) @@ -60,7 +60,7 @@ impl ToStr for Identifier { } -#[deriving_eq] +#[deriving(Eq)] pub struct Version { major: uint, minor: uint, diff --git a/src/libstd/test.rs b/src/libstd/test.rs index fcc60c8d97819..1829e29826fd8 100644 --- a/src/libstd/test.rs +++ b/src/libstd/test.rs @@ -188,13 +188,13 @@ pub fn parse_opts(args: &[~str]) -> OptRes { either::Left(test_opts) } -#[deriving_eq] +#[deriving(Eq)] pub struct BenchSamples { ns_iter_samples: ~[f64], mb_s: uint } -#[deriving_eq] +#[deriving(Eq)] pub enum TestResult { TrOk, TrFailed, TrIgnored, TrBench(BenchSamples) } struct ConsoleTestState { diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs index 68a6f8effaa77..f8b4337e437f2 100644 --- a/src/libstd/workcache.rs +++ b/src/libstd/workcache.rs @@ -96,7 +96,7 @@ use core::mutable::Mut; * */ -#[deriving_eq] +#[deriving(Eq)] #[auto_encode] #[auto_decode] struct WorkKey { diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 22ec88cd45625..cbdcef3eff65a 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -33,13 +33,13 @@ macro_rules! interner_key ( // table and a SyntaxContext to track renaming and // macro expansion per Flatt et al., "Macros // That Work Together" -#[deriving_eq] +#[deriving(Eq)] pub struct ident { repr: Name } // a SyntaxContext represents a chain of macro-expandings // and renamings. Each macro expansion corresponds to // a fresh uint -#[deriving_eq] +#[deriving(Eq)] pub enum SyntaxContext { MT, Mark (Mrk,~SyntaxContext), @@ -98,7 +98,7 @@ pub type fn_ident = Option; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct Lifetime { id: node_id, span: span, @@ -111,7 +111,7 @@ pub struct Lifetime { // of supporting information. #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct path { span: span, global: bool, @@ -126,7 +126,7 @@ pub type node_id = int; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct def_id { crate: crate_num, node: node_id, @@ -137,7 +137,7 @@ pub const crate_node_id: node_id = 0; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] // The AST represents all type param bounds as types. // typeck::collect::compute_bounds matches these against // the "special" built-in traits (see middle::lang_items) and @@ -149,7 +149,7 @@ pub enum TyParamBound { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct TyParam { ident: ident, id: node_id, @@ -158,7 +158,7 @@ pub struct TyParam { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct Generics { lifetimes: OptVec, ty_params: OptVec @@ -178,7 +178,7 @@ pub impl Generics { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum def { def_fn(def_id, purity), def_static_method(/* method */ def_id, @@ -216,7 +216,7 @@ pub type crate = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct crate_ { module: _mod, attrs: ~[attribute], @@ -227,7 +227,7 @@ pub type meta_item = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum meta_item_ { meta_word(@~str), meta_list(@~str, ~[@meta_item]), @@ -238,7 +238,7 @@ pub type blk = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct blk_ { view_items: ~[@view_item], stmts: ~[@stmt], @@ -249,7 +249,7 @@ pub struct blk_ { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct pat { id: node_id, node: pat_, @@ -258,7 +258,7 @@ pub struct pat { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct field_pat { ident: ident, pat: @pat, @@ -266,7 +266,7 @@ pub struct field_pat { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum binding_mode { bind_by_copy, bind_by_ref(mutability), @@ -289,7 +289,7 @@ impl to_bytes::IterBytes for binding_mode { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum pat_ { pat_wild, // A pat_ident may either be a new bound variable, @@ -316,7 +316,7 @@ pub enum pat_ { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum mutability { m_mutbl, m_imm, m_const, } impl to_bytes::IterBytes for mutability { @@ -327,7 +327,7 @@ impl to_bytes::IterBytes for mutability { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum Abi { RustAbi } @@ -348,7 +348,7 @@ impl ToStr for Abi { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum Sigil { BorrowedSigil, OwnedSigil, @@ -373,7 +373,7 @@ impl ToStr for Sigil { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum vstore { // FIXME (#3469): Change uint to @expr (actually only constant exprs) vstore_fixed(Option), // [1,2,3,4] @@ -384,7 +384,7 @@ pub enum vstore { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum expr_vstore { expr_vstore_fixed(Option), // [1,2,3,4] expr_vstore_uniq, // ~[1,2,3,4] @@ -396,7 +396,7 @@ pub enum expr_vstore { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum binop { add, subtract, @@ -420,7 +420,7 @@ pub enum binop { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum unop { box(mutability), uniq(mutability), @@ -433,7 +433,7 @@ pub enum unop { // using ty::resolved_T(...). #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum inferable { expl(T), infer(node_id) @@ -454,7 +454,7 @@ impl to_bytes::IterBytes for inferable { // "resolved" mode: the real modes. #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum rmode { by_ref, by_copy } impl to_bytes::IterBytes for rmode { @@ -470,7 +470,7 @@ pub type stmt = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum stmt_ { stmt_decl(@decl, node_id), @@ -488,7 +488,7 @@ pub enum stmt_ { // a refinement on pat. #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct local_ { is_mutbl: bool, ty: @Ty, @@ -503,12 +503,12 @@ pub type decl = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum decl_ { decl_local(~[@local]), decl_item(@item), } #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct arm { pats: ~[@pat], guard: Option<@expr>, @@ -517,7 +517,7 @@ pub struct arm { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct field_ { mutbl: mutability, ident: ident, @@ -528,12 +528,12 @@ pub type field = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum blk_check_mode { default_blk, unsafe_blk, } #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct expr { id: node_id, // Extra node ID is only used for index, assign_op, unary, binary, method @@ -545,13 +545,13 @@ pub struct expr { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum log_level { error, debug, log_other } // 0 = error, 1 = debug, 2 = log_other #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum CallSugar { NoSugar, DoSugar, @@ -560,7 +560,7 @@ pub enum CallSugar { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum expr_ { expr_vstore(@expr, expr_vstore), expr_vec(~[@expr], mutability), @@ -634,7 +634,7 @@ pub enum expr_ { // #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] #[doc="For macro invocations; parsing is delegated to the macro"] pub enum token_tree { // a single token @@ -709,7 +709,7 @@ pub type matcher = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum matcher_ { // match one token match_tok(::parse::token::Token), @@ -724,7 +724,7 @@ pub type mac = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum mac_ { mac_invoc_tt(@path,~[token_tree]), // new macro-invocation } @@ -733,7 +733,7 @@ pub type lit = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum lit_ { lit_str(@~str), lit_int(i64, int_ty), @@ -749,7 +749,7 @@ pub enum lit_ { // type structure in middle/ty.rs as well. #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct mt { ty: @Ty, mutbl: mutability, @@ -757,7 +757,7 @@ pub struct mt { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct ty_field_ { ident: ident, mt: mt, @@ -767,7 +767,7 @@ pub type ty_field = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct ty_method { ident: ident, attrs: ~[attribute], @@ -781,7 +781,7 @@ pub struct ty_method { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] // A trait method is either required (meaning it doesn't have an // implementation, just a signature) or provided (meaning it has a default // implementation). @@ -792,7 +792,7 @@ pub enum trait_method { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum int_ty { ty_i, ty_char, ty_i8, ty_i16, ty_i32, ty_i64, } impl ToStr for int_ty { @@ -809,7 +809,7 @@ impl to_bytes::IterBytes for int_ty { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum uint_ty { ty_u, ty_u8, ty_u16, ty_u32, ty_u64, } impl ToStr for uint_ty { @@ -826,7 +826,7 @@ impl to_bytes::IterBytes for uint_ty { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum float_ty { ty_f, ty_f32, ty_f64, } impl ToStr for float_ty { @@ -844,7 +844,7 @@ impl to_bytes::IterBytes for float_ty { // NB Eq method appears below. #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct Ty { id: node_id, node: ty_, @@ -854,7 +854,7 @@ pub struct Ty { // Not represented directly in the AST, referred to by name through a ty_path. #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum prim_ty { ty_int(int_ty), ty_uint(uint_ty), @@ -865,7 +865,7 @@ pub enum prim_ty { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum Onceness { Once, Many @@ -888,7 +888,7 @@ impl to_bytes::IterBytes for Onceness { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct TyClosure { sigil: Sigil, region: Option<@Lifetime>, @@ -899,7 +899,7 @@ pub struct TyClosure { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct TyBareFn { purity: purity, abi: Abi, @@ -908,7 +908,7 @@ pub struct TyBareFn { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum ty_ { ty_nil, ty_bot, /* bottom type */ @@ -937,7 +937,7 @@ impl to_bytes::IterBytes for Ty { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct arg { mode: mode, is_mutbl: bool, @@ -948,7 +948,7 @@ pub struct arg { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct fn_decl { inputs: ~[arg], output: @Ty, @@ -957,7 +957,7 @@ pub struct fn_decl { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum purity { pure_fn, // declared with "pure fn" unsafe_fn, // declared with "unsafe fn" @@ -984,7 +984,7 @@ impl to_bytes::IterBytes for purity { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum ret_style { noreturn, // functions with return type _|_ that always // 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_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum self_ty_ { sty_static, // no self sty_by_ref, // `` @@ -1022,7 +1022,7 @@ pub type self_ty = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct method { ident: ident, attrs: ~[attribute], @@ -1039,7 +1039,7 @@ pub struct method { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct _mod { view_items: ~[@view_item], items: ~[@item], @@ -1047,7 +1047,7 @@ pub struct _mod { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum foreign_abi { foreign_abi_rust_intrinsic, foreign_abi_cdecl, @@ -1057,12 +1057,12 @@ pub enum foreign_abi { // Foreign mods can be named or anonymous #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum foreign_mod_sort { named, anonymous } #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct foreign_mod { sort: foreign_mod_sort, abi: ident, @@ -1072,7 +1072,7 @@ pub struct foreign_mod { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct variant_arg { ty: @Ty, id: node_id, @@ -1080,7 +1080,7 @@ pub struct variant_arg { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum variant_kind { tuple_variant_kind(~[variant_arg]), struct_variant_kind(@struct_def), @@ -1089,7 +1089,7 @@ pub enum variant_kind { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct enum_def { variants: ~[variant], common: Option<@struct_def>, @@ -1097,7 +1097,7 @@ pub struct enum_def { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct variant_ { name: ident, attrs: ~[attribute], @@ -1111,7 +1111,7 @@ pub type variant = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct path_list_ident_ { name: ident, id: node_id, @@ -1121,14 +1121,14 @@ pub type path_list_ident = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum namespace { module_ns, type_value_ns } pub type view_path = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum view_path_ { // quux = foo::bar::baz @@ -1147,7 +1147,7 @@ pub enum view_path_ { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct view_item { node: view_item_, attrs: ~[attribute], @@ -1157,7 +1157,7 @@ pub struct view_item { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum view_item_ { view_item_extern_mod(ident, ~[@meta_item], node_id), view_item_use(~[@view_path]), @@ -1171,13 +1171,13 @@ pub type attribute = spanned; // distinguished for pretty-printing. #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum attr_style { attr_outer, attr_inner, } // doc-comments are promoted to attributes that have is_sugared_doc = true #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct attribute_ { style: attr_style, value: @meta_item, @@ -1193,7 +1193,7 @@ pub struct attribute_ { */ #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct trait_ref { path: @path, ref_id: node_id, @@ -1201,12 +1201,12 @@ pub struct trait_ref { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum visibility { public, private, inherited } #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct struct_field_ { kind: struct_field_kind, id: node_id, @@ -1217,7 +1217,7 @@ pub type struct_field = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum struct_field_kind { named_field(ident, struct_mutability, visibility), unnamed_field // element of a tuple-like struct @@ -1225,7 +1225,7 @@ pub enum struct_field_kind { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct struct_def { fields: ~[@struct_field], /* fields */ /* (not including ctor or dtor) */ @@ -1242,7 +1242,7 @@ pub struct struct_def { */ #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct item { ident: ident, attrs: ~[attribute], @@ -1254,7 +1254,7 @@ pub struct item { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum item_ { item_const(@Ty, @expr), item_fn(fn_decl, purity, Generics, blk), @@ -1274,7 +1274,7 @@ pub enum item_ { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum struct_mutability { struct_mutable, struct_immutable } impl to_bytes::IterBytes for struct_mutability { @@ -1287,7 +1287,7 @@ pub type struct_dtor = spanned; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct struct_dtor_ { id: node_id, attrs: ~[attribute], @@ -1297,7 +1297,7 @@ pub struct struct_dtor_ { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct foreign_item { ident: ident, attrs: ~[attribute], @@ -1309,7 +1309,7 @@ pub struct foreign_item { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum foreign_item_ { foreign_item_fn(fn_decl, purity, Generics), foreign_item_const(@Ty) @@ -1320,7 +1320,7 @@ pub enum foreign_item_ { // that we trans. #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum inlined_item { ii_item(@item), ii_method(def_id /* impl id */, @method), diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 35b188a248fd4..1225e71cb8c1f 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -582,7 +582,7 @@ pub fn variant_visibility_to_privacy(visibility: visibility, } } -#[deriving_eq] +#[deriving(Eq)] pub enum Privacy { Private, Public diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index c2309dbf0e8eb..c84e3abf50bc9 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -128,7 +128,7 @@ pub struct span { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub struct spanned { node: T, span: span } impl cmp::Eq for span { diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index 93d28f31c8db4..eed36e16754f5 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -160,7 +160,7 @@ pub fn mk_handler(emitter: Option) -> @handler { @mut HandlerT { err_count: 0, emit: emit } as @handler } -#[deriving_eq] +#[deriving(Eq)] pub enum level { fatal, error, diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index 3ab95258f038e..e5f818eef5c23 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -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), diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 34e4d8c73e72c..50f89d37fae8e 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -153,13 +153,13 @@ pub fn syntax_expander_table() -> SyntaxEnv { ext::deriving::expand_meta_deriving))); syntax_expanders.insert(@~"deriving_eq", @SE(ItemDecorator( - ext::deriving::eq::expand_deriving_eq))); + ext::deriving::eq::expand_deriving_obsolete))); syntax_expanders.insert(@~"deriving_iter_bytes", @SE(ItemDecorator( - ext::deriving::iter_bytes::expand_deriving_iter_bytes))); + ext::deriving::iter_bytes::expand_deriving_obsolete))); syntax_expanders.insert(@~"deriving_clone", @SE(ItemDecorator( - ext::deriving::clone::expand_deriving_clone))); + ext::deriving::clone::expand_deriving_obsolete))); // Quasi-quoting expanders syntax_expanders.insert(@~"quote_tokens", diff --git a/src/libsyntax/ext/deriving/clone.rs b/src/libsyntax/ext/deriving/clone.rs index 072cd0f6c39b2..4ab83cb5f1e42 100644 --- a/src/libsyntax/ext/deriving/clone.rs +++ b/src/libsyntax/ext/deriving/clone.rs @@ -39,6 +39,15 @@ pub fn expand_deriving_clone(cx: @ext_ctxt, expand_deriving_clone_enum_def) } +pub fn expand_deriving_obsolete(cx: @ext_ctxt, + span: span, + _mitem: @meta_item, + in_items: ~[@item]) + -> ~[@item] { + cx.span_err(span, ~"`#[deriving_clone]` is obsolete; use `#[deriving(Clone)]` instead"); + in_items +} + fn create_derived_clone_impl(cx: @ext_ctxt, span: span, type_ident: ident, diff --git a/src/libsyntax/ext/deriving/eq.rs b/src/libsyntax/ext/deriving/eq.rs index 6213eeca13461..5e94134f70afe 100644 --- a/src/libsyntax/ext/deriving/eq.rs +++ b/src/libsyntax/ext/deriving/eq.rs @@ -53,6 +53,15 @@ pub fn expand_deriving_eq(cx: @ext_ctxt, expand_deriving_eq_enum_def) } +pub fn expand_deriving_obsolete(cx: @ext_ctxt, + span: span, + _mitem: @meta_item, + in_items: ~[@item]) + -> ~[@item] { + cx.span_err(span, ~"`#[deriving_eq]` is obsolete; use `#[deriving(Eq)]` instead"); + in_items +} + /// Creates a method from the given expression, the signature of which /// conforms to the `eq` or `ne` method. fn create_eq_method(cx: @ext_ctxt, diff --git a/src/libsyntax/ext/deriving/iter_bytes.rs b/src/libsyntax/ext/deriving/iter_bytes.rs index 613e9c295eb74..75d7b396c7e15 100644 --- a/src/libsyntax/ext/deriving/iter_bytes.rs +++ b/src/libsyntax/ext/deriving/iter_bytes.rs @@ -39,6 +39,16 @@ pub fn expand_deriving_iter_bytes(cx: @ext_ctxt, expand_deriving_iter_bytes_enum_def) } +pub fn expand_deriving_obsolete(cx: @ext_ctxt, + span: span, + _mitem: @meta_item, + in_items: ~[@item]) + -> ~[@item] { + cx.span_err(span, ~"`#[deriving_iter_bytes]` is obsolete; use `#[deriving(IterBytes)]` \ + instead"); + in_items +} + fn create_derived_iter_bytes_impl(cx: @ext_ctxt, span: span, type_ident: ident, diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs index 63bb438999969..57fddd623d474 100644 --- a/src/libsyntax/ext/deriving/mod.rs +++ b/src/libsyntax/ext/deriving/mod.rs @@ -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::*; diff --git a/src/libsyntax/ext/pipes/proto.rs b/src/libsyntax/ext/pipes/proto.rs index a47b39a45c864..d72da6f2d350e 100644 --- a/src/libsyntax/ext/pipes/proto.rs +++ b/src/libsyntax/ext/pipes/proto.rs @@ -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 { diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs index dbabca55a11f4..435bfbdad24bf 100644 --- a/src/libsyntax/opt_vec.rs +++ b/src/libsyntax/opt_vec.rs @@ -106,7 +106,7 @@ impl OptVec { impl Eq for OptVec { pure fn eq(&self, other: &OptVec) -> 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, diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index b92b72822740f..f53ac2719019d 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -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 { diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index 573f90af020a2..5cc1ea756e4d7 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -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, diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 95f8afd538a8c..e899c79a74cb7 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -93,7 +93,7 @@ use core::either; use core::vec; use std::oldmap::HashMap; -#[deriving_eq] +#[deriving(Eq)] enum restriction { UNRESTRICTED, RESTRICT_STMT_EXPR, diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index c41b3aec09bdc..5a774718b7d09 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -24,7 +24,7 @@ use std::oldmap::HashMap; #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum binop { PLUS, MINUS, @@ -40,7 +40,7 @@ pub enum binop { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] pub enum Token { /* Expression-operator symbols. */ EQ, @@ -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), diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index ed108df7db250..d002267547351 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -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 { diff --git a/src/test/compile-fail/deriving-obsolete.rs b/src/test/compile-fail/deriving-obsolete.rs new file mode 100644 index 0000000000000..298dced1e21ed --- /dev/null +++ b/src/test/compile-fail/deriving-obsolete.rs @@ -0,0 +1,17 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[deriving_clone] //~ ERROR `#[deriving_clone]` is obsolete; use `#[deriving(Clone)]` instead +#[deriving_eq] //~ ERROR `#[deriving_eq]` is obsolete; use `#[deriving(Eq)]` instead +#[deriving_iter_bytes] +//~^ ERROR `#[deriving_iter_bytes]` is obsolete; use `#[deriving(IterBytes)]` instead +struct Foo; + +pub fn main() { } diff --git a/src/test/run-fail/assert-eq-macro-fail.rs b/src/test/run-fail/assert-eq-macro-fail.rs index a5f438903ce9b..d3177e7c0a8a8 100644 --- a/src/test/run-fail/assert-eq-macro-fail.rs +++ b/src/test/run-fail/assert-eq-macro-fail.rs @@ -1,6 +1,6 @@ // error-pattern:expected: 15, given: 14 -#[deriving_eq] +#[deriving(Eq)] struct Point { x : int } fn main() { diff --git a/src/test/run-pass/assert-eq-macro-success.rs b/src/test/run-pass/assert-eq-macro-success.rs index c929b5c6246e9..b204e1aba3a71 100644 --- a/src/test/run-pass/assert-eq-macro-success.rs +++ b/src/test/run-pass/assert-eq-macro-success.rs @@ -1,4 +1,4 @@ -#[deriving_eq] +#[deriving(Eq)] struct Point { x : int } fn main() { diff --git a/src/test/run-pass/auto-encode.rs b/src/test/run-pass/auto-encode.rs index b6fdb07789c8d..7538892f03892 100644 --- a/src/test/run-pass/auto-encode.rs +++ b/src/test/run-pass/auto-encode.rs @@ -121,7 +121,7 @@ impl cmp::Eq for CLike { #[auto_encode] #[auto_decode] -#[deriving_eq] +#[deriving(Eq)] struct Spanned { lo: uint, hi: uint, diff --git a/src/test/run-pass/binops.rs b/src/test/run-pass/binops.rs index bcc76cc35858f..3f5547df17d8f 100644 --- a/src/test/run-pass/binops.rs +++ b/src/test/run-pass/binops.rs @@ -88,7 +88,7 @@ mod test { } } -#[deriving_eq] +#[deriving(Eq)] struct p { x: int, y: int, diff --git a/src/test/run-pass/deriving-clone-enum.rs b/src/test/run-pass/deriving-clone-enum.rs index bad83f41bac65..ee294cb594230 100644 --- a/src/test/run-pass/deriving-clone-enum.rs +++ b/src/test/run-pass/deriving-clone-enum.rs @@ -1,4 +1,4 @@ -#[deriving_clone] +#[deriving(Clone)] enum E { A, B(()), diff --git a/src/test/run-pass/deriving-clone-generic-enum.rs b/src/test/run-pass/deriving-clone-generic-enum.rs index c70e644e2a860..a868db2425cc2 100644 --- a/src/test/run-pass/deriving-clone-generic-enum.rs +++ b/src/test/run-pass/deriving-clone-generic-enum.rs @@ -1,4 +1,4 @@ -#[deriving_clone] +#[deriving(Clone)] enum E { A(T), B(T,U), diff --git a/src/test/run-pass/deriving-clone-generic-struct.rs b/src/test/run-pass/deriving-clone-generic-struct.rs index 73fb3ad8d6477..92721c5343573 100644 --- a/src/test/run-pass/deriving-clone-generic-struct.rs +++ b/src/test/run-pass/deriving-clone-generic-struct.rs @@ -1,4 +1,4 @@ -#[deriving_clone] +#[deriving(Clone)] struct S { foo: (), bar: (), diff --git a/src/test/run-pass/deriving-clone-generic-tuple-struct.rs b/src/test/run-pass/deriving-clone-generic-tuple-struct.rs index d7b15d63280d0..aeaa9ed726d2b 100644 --- a/src/test/run-pass/deriving-clone-generic-tuple-struct.rs +++ b/src/test/run-pass/deriving-clone-generic-tuple-struct.rs @@ -1,4 +1,4 @@ -#[deriving_clone] +#[deriving(Clone)] struct S(T, ()); fn main() {} diff --git a/src/test/run-pass/deriving-clone-struct.rs b/src/test/run-pass/deriving-clone-struct.rs index 07830e7ee096b..4dcbadbb3ef92 100644 --- a/src/test/run-pass/deriving-clone-struct.rs +++ b/src/test/run-pass/deriving-clone-struct.rs @@ -1,4 +1,4 @@ -#[deriving_clone] +#[deriving(Clone)] struct S { _int: int, _i8: i8, diff --git a/src/test/run-pass/deriving-clone-tuple-struct.rs b/src/test/run-pass/deriving-clone-tuple-struct.rs index a1a79613d401f..04ddb439485fd 100644 --- a/src/test/run-pass/deriving-clone-tuple-struct.rs +++ b/src/test/run-pass/deriving-clone-tuple-struct.rs @@ -1,4 +1,4 @@ -#[deriving_clone] +#[deriving(Clone)] struct S((), ()); fn main() {} diff --git a/src/test/run-pass/deriving-enum-single-variant.rs b/src/test/run-pass/deriving-enum-single-variant.rs index 7b86a6299f6f7..ebbdc157c7d13 100644 --- a/src/test/run-pass/deriving-enum-single-variant.rs +++ b/src/test/run-pass/deriving-enum-single-variant.rs @@ -1,6 +1,6 @@ type task_id = int; -#[deriving_eq] +#[deriving(Eq)] pub enum Task { TaskHandle(task_id) } diff --git a/src/test/run-pass/deriving-via-extension-c-enum.rs b/src/test/run-pass/deriving-via-extension-c-enum.rs index 9431e6b8343ca..47d088cfc6f26 100644 --- a/src/test/run-pass/deriving-via-extension-c-enum.rs +++ b/src/test/run-pass/deriving-via-extension-c-enum.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_eq] +#[deriving(Eq)] enum Foo { Bar, Baz, diff --git a/src/test/run-pass/deriving-via-extension-enum.rs b/src/test/run-pass/deriving-via-extension-enum.rs index 35575285e7a7d..32f693abf2555 100644 --- a/src/test/run-pass/deriving-via-extension-enum.rs +++ b/src/test/run-pass/deriving-via-extension-enum.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_eq] +#[deriving(Eq)] enum Foo { Bar(int, int), Baz(float, float) diff --git a/src/test/run-pass/deriving-via-extension-iter-bytes-enum.rs b/src/test/run-pass/deriving-via-extension-iter-bytes-enum.rs index b41d41192fedb..5ceb8c48750d9 100644 --- a/src/test/run-pass/deriving-via-extension-iter-bytes-enum.rs +++ b/src/test/run-pass/deriving-via-extension-iter-bytes-enum.rs @@ -10,13 +10,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_iter_bytes] +#[deriving(IterBytes)] enum Foo { Bar(int, char), Baz(char, int) } -#[deriving_iter_bytes] +#[deriving(IterBytes)] enum A { B, C, diff --git a/src/test/run-pass/deriving-via-extension-iter-bytes-struct.rs b/src/test/run-pass/deriving-via-extension-iter-bytes-struct.rs index 18336d74c7e19..9f18cb6ac58a7 100644 --- a/src/test/run-pass/deriving-via-extension-iter-bytes-struct.rs +++ b/src/test/run-pass/deriving-via-extension-iter-bytes-struct.rs @@ -10,7 +10,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_iter_bytes] +#[deriving(IterBytes)] struct Foo { x: int, y: int, diff --git a/src/test/run-pass/deriving-via-extension-struct-empty.rs b/src/test/run-pass/deriving-via-extension-struct-empty.rs index 4c8c81d5312f9..09ee83870a0e2 100644 --- a/src/test/run-pass/deriving-via-extension-struct-empty.rs +++ b/src/test/run-pass/deriving-via-extension-struct-empty.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_eq] +#[deriving(Eq)] struct Foo; pub fn main() { diff --git a/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs b/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs index 0f44f7b7cf980..c349600eb9998 100644 --- a/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs +++ b/src/test/run-pass/deriving-via-extension-struct-like-enum-variant.rs @@ -1,4 +1,4 @@ -#[deriving_eq] +#[deriving(Eq)] enum S { X { x: int, y: int }, Y diff --git a/src/test/run-pass/deriving-via-extension-struct-tuple.rs b/src/test/run-pass/deriving-via-extension-struct-tuple.rs index ab68d50249100..35c20c13e9371 100644 --- a/src/test/run-pass/deriving-via-extension-struct-tuple.rs +++ b/src/test/run-pass/deriving-via-extension-struct-tuple.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_eq] +#[deriving(Eq)] struct Foo(int, int, ~str); pub fn main() { diff --git a/src/test/run-pass/deriving-via-extension-struct.rs b/src/test/run-pass/deriving-via-extension-struct.rs index f1d50e4e824ea..f5cc85c638250 100644 --- a/src/test/run-pass/deriving-via-extension-struct.rs +++ b/src/test/run-pass/deriving-via-extension-struct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_eq] +#[deriving(Eq)] struct Foo { x: int, y: int, diff --git a/src/test/run-pass/deriving-via-extension-type-params.rs b/src/test/run-pass/deriving-via-extension-type-params.rs index 07c09dc7fd4f6..298e30f7ec1e7 100644 --- a/src/test/run-pass/deriving-via-extension-type-params.rs +++ b/src/test/run-pass/deriving-via-extension-type-params.rs @@ -10,8 +10,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_eq] -#[deriving_iter_bytes] +#[deriving(Eq)] +#[deriving(IterBytes)] struct Foo { x: int, y: T, diff --git a/src/test/run-pass/extern-pass-TwoU64s-ref.rs b/src/test/run-pass/extern-pass-TwoU64s-ref.rs index 00754afa703b2..f04e9d086e94f 100644 --- a/src/test/run-pass/extern-pass-TwoU64s-ref.rs +++ b/src/test/run-pass/extern-pass-TwoU64s-ref.rs @@ -12,7 +12,7 @@ // xfail-test --- broken on 32-bit ABIs! (#5347) -#[deriving_eq] +#[deriving(Eq)] struct TwoU64s { one: u64, two: u64 } diff --git a/src/test/run-pass/extern-pass-TwoU64s.rs b/src/test/run-pass/extern-pass-TwoU64s.rs index 2baf383ce545f..1937ddaa9f42a 100644 --- a/src/test/run-pass/extern-pass-TwoU64s.rs +++ b/src/test/run-pass/extern-pass-TwoU64s.rs @@ -13,7 +13,7 @@ // xfail-test --- broken on 32-bit ABIs! (#5347) -#[deriving_eq] +#[deriving(Eq)] struct TwoU64s { one: u64, two: u64 } diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index c8c2d381a7e99..cc4f10ca347b4 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -20,7 +20,7 @@ pub mod pipes { payload: Option } - #[deriving_eq] + #[deriving(Eq)] pub enum state { empty, full, diff --git a/src/test/run-pass/issue-3935.rs b/src/test/run-pass/issue-3935.rs index e0832bc74b2f3..626932850cf42 100644 --- a/src/test/run-pass/issue-3935.rs +++ b/src/test/run-pass/issue-3935.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving_eq] +#[deriving(Eq)] struct Bike { name: ~str, } diff --git a/src/test/run-pass/while-prelude-drop.rs b/src/test/run-pass/while-prelude-drop.rs index da3f28f5b7bca..082f2db259a4a 100644 --- a/src/test/run-pass/while-prelude-drop.rs +++ b/src/test/run-pass/while-prelude-drop.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving_eq] +#[deriving(Eq)] enum t { a, b(~str), } fn make(i: int) -> t {