diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs index 692ecf75091c4..82aa40cb0ad79 100644 --- a/src/librustc/lint/builtin.rs +++ b/src/librustc/lint/builtin.rs @@ -551,7 +551,7 @@ impl LintPass for BoxPointers { declare_lint! { RAW_POINTER_DERIVING, Warn, - "uses of #[deriving] with raw pointers are rarely correct" + "uses of #[derive] with raw pointers are rarely correct" } struct RawPtrDerivingVisitor<'a, 'tcx: 'a> { @@ -560,7 +560,7 @@ struct RawPtrDerivingVisitor<'a, 'tcx: 'a> { impl<'a, 'tcx, 'v> Visitor<'v> for RawPtrDerivingVisitor<'a, 'tcx> { fn visit_ty(&mut self, ty: &ast::Ty) { - static MSG: &'static str = "use of `#[deriving]` with a raw pointer"; + static MSG: &'static str = "use of `#[derive]` with a raw pointer"; if let ast::TyPtr(..) = ty.node { self.cx.span_lint(RAW_POINTER_DERIVING, ty.span, MSG); } diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs index 7dbcc810b571b..efb9b636247da 100644 --- a/src/librustc_resolve/build_reduced_graph.rs +++ b/src/librustc_resolve/build_reduced_graph.rs @@ -681,9 +681,10 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> { ViewPathSimple(binding, ref full_path, id) => { let source_name = full_path.segments.last().unwrap().identifier.name; - if token::get_name(source_name).get() == "mod" { + if token::get_name(source_name).get() == "mod" || + token::get_name(source_name).get() == "self" { self.resolve_error(view_path.span, - "`mod` imports are only allowed within a { } list"); + "`self` imports are only allowed within a { } list"); } let subclass = SingleImport(binding.name, @@ -704,10 +705,10 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> { }).collect::>(); if mod_spans.len() > 1 { self.resolve_error(mod_spans[0], - "`mod` import can only appear once in the list"); + "`self` import can only appear once in the list"); for other_span in mod_spans.iter().skip(1) { self.session.span_note(*other_span, - "another `mod` import appears here"); + "another `self` import appears here"); } } @@ -720,7 +721,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> { Some(name) => *name, None => { self.resolve_error(source_item.span, - "`mod` import can only appear in an import list \ + "`self` import can only appear in an import list \ with a non-empty prefix"); continue; } diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 10756f21551a0..11328bedcc493 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -971,6 +971,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { } } + // Import resolution // // This is a fixed-point algorithm. We resolve imports until our efforts diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 5134897893f24..efb4867a016be 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -390,6 +390,8 @@ fn initial_syntax_expander_table(ecfg: &expand::ExpansionConfig) -> SyntaxEnv { syntax_expanders.insert(intern("log_syntax"), builtin_normal_expander( ext::log_syntax::expand_syntax_ext)); + syntax_expanders.insert(intern("derive"), + Decorator(box ext::deriving::expand_meta_derive)); syntax_expanders.insert(intern("deriving"), Decorator(box ext::deriving::expand_meta_deriving)); diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 9149c20ce1b57..acfb020fab67e 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -9,7 +9,7 @@ // except according to those terms. //! Some code that abstracts away much of the boilerplate of writing -//! `deriving` instances for traits. Among other things it manages getting +//! `derive` instances for traits. Among other things it manages getting //! access to the fields of the 4 different sorts of structs and enum //! variants, as well as creating the method and impl ast instances. //! @@ -26,7 +26,7 @@ //! moment. (`TraitDef.additional_bounds`) //! //! Unsupported: FIXME #6257: calling methods on reference fields, -//! e.g. deriving Eq/Ord/Clone don't work on `struct A(&int)`, +//! e.g. derive Eq/Ord/Clone don't work on `struct A(&int)`, //! because of how the auto-dereferencing happens. //! //! The most important thing for implementers is the `Substructure` and @@ -209,7 +209,7 @@ use self::ty::{LifetimeBounds, Path, Ptr, PtrTy, Self, Ty}; pub mod ty; pub struct TraitDef<'a> { - /// The span for the current #[deriving(Foo)] header. + /// The span for the current #[derive(Foo)] header. pub span: Span, pub attributes: Vec, @@ -354,7 +354,7 @@ impl<'a> TraitDef<'a> { generics) } _ => { - cx.span_err(mitem.span, "`deriving` may only be applied to structs and enums"); + cx.span_err(mitem.span, "`derive` may only be applied to structs and enums"); return; } }; @@ -718,7 +718,7 @@ impl<'a> MethodDef<'a> { } /// ``` - /// #[deriving(PartialEq)] + /// #[derive(PartialEq)] /// struct A { x: int, y: int } /// /// // equivalent to: @@ -782,7 +782,7 @@ impl<'a> MethodDef<'a> { } else { cx.span_bug(trait_.span, "no self arguments to non-static method in generic \ - `deriving`") + `derive`") }; // body of the inner most destructuring match @@ -822,7 +822,7 @@ impl<'a> MethodDef<'a> { } /// ``` - /// #[deriving(PartialEq)] + /// #[derive(PartialEq)] /// enum A { /// A1, /// A2(int) @@ -1185,7 +1185,7 @@ impl<'a> TraitDef<'a> { cx: &mut ExtCtxt, mut to_set: Span) -> Span { let trait_name = match self.path.path.last() { - None => cx.span_bug(self.span, "trait with empty path in generic `deriving`"), + None => cx.span_bug(self.span, "trait with empty path in generic `derive`"), Some(name) => *name }; to_set.expn_id = cx.codemap().record_expansion(codemap::ExpnInfo { @@ -1215,7 +1215,7 @@ impl<'a> TraitDef<'a> { match (just_spans.is_empty(), named_idents.is_empty()) { (false, false) => cx.span_bug(self.span, "a struct with named and unnamed \ - fields in generic `deriving`"), + fields in generic `derive`"), // named fields (_, false) => Named(named_idents), // tuple structs (includes empty structs) @@ -1263,7 +1263,7 @@ impl<'a> TraitDef<'a> { None } _ => { - cx.span_bug(sp, "a struct with named and unnamed fields in `deriving`"); + cx.span_bug(sp, "a struct with named and unnamed fields in `derive`"); } }; let ident = cx.ident_of(format!("{}_{}", prefix, i)[]); @@ -1371,7 +1371,7 @@ pub fn cs_fold(use_foldl: bool, enum_nonmatch_f(cx, trait_span, (all_args[], tuple), substructure.nonself_args), StaticEnum(..) | StaticStruct(..) => { - cx.span_bug(trait_span, "static function in `deriving`") + cx.span_bug(trait_span, "static function in `derive`") } } } @@ -1411,7 +1411,7 @@ pub fn cs_same_method(f: F, enum_nonmatch_f(cx, trait_span, (all_self_args[], tuple), substructure.nonself_args), StaticEnum(..) | StaticStruct(..) => { - cx.span_bug(trait_span, "static function in `deriving`") + cx.span_bug(trait_span, "static function in `derive`") } } } diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs index 75f763b5c38ee..57d66f0e35524 100644 --- a/src/libsyntax/ext/deriving/mod.rs +++ b/src/libsyntax/ext/deriving/mod.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! The compiler code necessary to implement the `#[deriving]` extensions. +//! The compiler code necessary to implement the `#[derive]` extensions. //! //! FIXME (#2810): hygiene. Search for "__" strings (in other files too). We also assume "extra" is //! the standard library, and "std" is the core library. @@ -45,16 +45,26 @@ pub fn expand_meta_deriving(cx: &mut ExtCtxt, _span: Span, mitem: &MetaItem, item: &Item, - mut push: Box)>) { + push: Box)>) { + cx.span_warn(mitem.span, "`deriving` is deprecated; use `derive`"); + + expand_meta_derive(cx, _span, mitem, item, push) +} + +pub fn expand_meta_derive(cx: &mut ExtCtxt, + _span: Span, + mitem: &MetaItem, + item: &Item, + mut push: Box)>) { match mitem.node { MetaNameValue(_, ref l) => { - cx.span_err(l.span, "unexpected value in `deriving`"); + cx.span_err(l.span, "unexpected value in `derive`"); } MetaWord(_) => { - cx.span_warn(mitem.span, "empty trait list in `deriving`"); + cx.span_warn(mitem.span, "empty trait list in `derive`"); } MetaList(_, ref titems) if titems.len() == 0 => { - cx.span_warn(mitem.span, "empty trait list in `deriving`"); + cx.span_warn(mitem.span, "empty trait list in `derive`"); } MetaList(_, ref titems) => { for titem in titems.iter().rev() { @@ -78,15 +88,15 @@ pub fn expand_meta_deriving(cx: &mut ExtCtxt, } "Encodable" => { cx.span_warn(titem.span, - "deriving(Encodable) is deprecated \ - in favor of deriving(RustcEncodable)"); + "derive(Encodable) is deprecated \ + in favor of derive(RustcEncodable)"); expand!(encodable::expand_deriving_encodable) } "Decodable" => { cx.span_warn(titem.span, - "deriving(Decodable) is deprecated \ - in favor of deriving(RustcDecodable)"); + "derive(Decodable) is deprecated \ + in favor of derive(RustcDecodable)"); expand!(decodable::expand_deriving_decodable) } @@ -111,7 +121,7 @@ pub fn expand_meta_deriving(cx: &mut ExtCtxt, ref tname => { cx.span_err(titem.span, - format!("unknown `deriving` \ + format!("unknown `derive` \ trait: `{}`", *tname)[]); } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 457085f5cc848..f84ddcf360ebe 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -546,6 +546,10 @@ impl<'a> Parser<'a> { pub fn parse_path_list_item(&mut self) -> ast::PathListItem { let lo = self.span.lo; let node = if self.eat_keyword(keywords::Mod) { + let span = self.last_span; + self.span_warn(span, "deprecated syntax; use the `self` keyword now"); + ast::PathListMod { id: ast::DUMMY_NODE_ID } + } else if self.eat_keyword(keywords::Self) { ast::PathListMod { id: ast::DUMMY_NODE_ID } } else { let ident = self.parse_ident(); diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 02a03285d3b86..877b2c7b7d366 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2540,7 +2540,7 @@ impl<'a> State<'a> { s.print_ident(name) }, ast::PathListMod { .. } => { - word(&mut s.s, "mod") + word(&mut s.s, "self") } } })); diff --git a/src/test/auxiliary/trait_inheritance_overloading_xc.rs b/src/test/auxiliary/trait_inheritance_overloading_xc.rs index 61854aba2790d..0e90db2835f9e 100644 --- a/src/test/auxiliary/trait_inheritance_overloading_xc.rs +++ b/src/test/auxiliary/trait_inheritance_overloading_xc.rs @@ -13,7 +13,7 @@ use std::cmp::PartialEq; pub trait MyNum : Add + Sub + Mul + PartialEq + Clone { } -#[deriving(Clone, Show)] +#[derive(Clone, Show)] pub struct MyInt { pub val: int } diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs index a0ef392ed3af2..1408cfe6eeee4 100644 --- a/src/test/bench/shootout-k-nucleotide.rs +++ b/src/test/bench/shootout-k-nucleotide.rs @@ -60,7 +60,7 @@ static OCCURRENCES: [&'static str;5] = [ // Code implementation -#[deriving(PartialEq, PartialOrd, Ord, Eq)] +#[derive(PartialEq, PartialOrd, Ord, Eq)] struct Code(u64); impl Copy for Code {} diff --git a/src/test/bench/task-perf-alloc-unwind.rs b/src/test/bench/task-perf-alloc-unwind.rs index 8bcf30b4859ff..b27a8710e326b 100644 --- a/src/test/bench/task-perf-alloc-unwind.rs +++ b/src/test/bench/task-perf-alloc-unwind.rs @@ -14,7 +14,7 @@ use std::os; use std::task; use std::time::Duration; -#[deriving(Clone)] +#[derive(Clone)] enum List { Nil, Cons(T, Box>) } diff --git a/src/test/compile-fail/associated-types-issue-20346.rs b/src/test/compile-fail/associated-types-issue-20346.rs index 255b8a25a4cab..e4364b12580d3 100644 --- a/src/test/compile-fail/associated-types-issue-20346.rs +++ b/src/test/compile-fail/associated-types-issue-20346.rs @@ -14,7 +14,7 @@ #![feature(associated_types)] #![no_implicit_prelude] -use std::option::Option::{None, Some, mod}; +use std::option::Option::{self, None, Some}; use std::vec::Vec; trait Iterator { diff --git a/src/test/compile-fail/attr-before-eof.rs b/src/test/compile-fail/attr-before-eof.rs index 7e8f41ba217d8..5fe88cafacf4c 100644 --- a/src/test/compile-fail/attr-before-eof.rs +++ b/src/test/compile-fail/attr-before-eof.rs @@ -8,4 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] //~ERROR expected item after attributes +#[derive(Show)] //~ERROR expected item after attributes diff --git a/src/test/compile-fail/borrowck-init-in-fru.rs b/src/test/compile-fail/borrowck-init-in-fru.rs index 6a42989b47bba..ac90b7cb4328e 100644 --- a/src/test/compile-fail/borrowck-init-in-fru.rs +++ b/src/test/compile-fail/borrowck-init-in-fru.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] struct point { x: int, y: int, diff --git a/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs index 692303fc1e481..3317295f88f5c 100644 --- a/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs +++ b/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] struct foo(Box); impl Add for foo { diff --git a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs index b83e1544c96d3..3143da99f4874 100644 --- a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs +++ b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Copy)] +#[derive(Copy)] struct Point { x: int, y: int, diff --git a/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs b/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs index 8d94b553f11e4..047ab93530b26 100644 --- a/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs +++ b/src/test/compile-fail/borrowck-move-out-of-vec-tail.rs @@ -10,7 +10,7 @@ // Test that we do not permit moves from &[] matched by a vec pattern. -#[deriving(Clone, Show)] +#[derive(Clone, Show)] struct Foo { string: String } diff --git a/src/test/compile-fail/coherence-blanket-conflicts-with-specific-multidispatch.rs b/src/test/compile-fail/coherence-blanket-conflicts-with-specific-multidispatch.rs index da2e6200eb65f..f3efca369b310 100644 --- a/src/test/compile-fail/coherence-blanket-conflicts-with-specific-multidispatch.rs +++ b/src/test/compile-fail/coherence-blanket-conflicts-with-specific-multidispatch.rs @@ -24,7 +24,7 @@ impl MyTrait for T { //~ ERROR E0119 } } -#[deriving(Clone)] +#[derive(Clone)] struct MyType { dummy: uint } diff --git a/src/test/compile-fail/copy-a-resource.rs b/src/test/compile-fail/copy-a-resource.rs index 67537464a3348..98cf7009f0f08 100644 --- a/src/test/compile-fail/copy-a-resource.rs +++ b/src/test/compile-fail/copy-a-resource.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct foo { i: int, } diff --git a/src/test/compile-fail/deriving-bounds.rs b/src/test/compile-fail/deriving-bounds.rs index d61ad98ee1e53..c0bcbb284a15e 100644 --- a/src/test/compile-fail/deriving-bounds.rs +++ b/src/test/compile-fail/deriving-bounds.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Copy(Bad))] +#[derive(Copy(Bad))] //~^ ERROR unexpected value in deriving, expected a trait struct Test; -#[deriving(Sync)] +#[derive(Sync)] //~^ ERROR Sync is an unsafe trait and it should be implemented explicitly struct Test1; diff --git a/src/test/compile-fail/deriving-meta-unknown-trait.rs b/src/test/compile-fail/deriving-meta-unknown-trait.rs index 0b9f61dac9eb8..6b85656bdd9e6 100644 --- a/src/test/compile-fail/deriving-meta-unknown-trait.rs +++ b/src/test/compile-fail/deriving-meta-unknown-trait.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Eqr)] //~ ERROR unknown `deriving` trait: `Eqr` +#[derive(Eqr)] //~ ERROR unknown `derive` trait: `Eqr` struct Foo; pub fn main() {} diff --git a/src/test/compile-fail/deriving-no-inner-impl-error-message.rs b/src/test/compile-fail/deriving-no-inner-impl-error-message.rs index 18be03f97d934..ac63cc27da1ee 100644 --- a/src/test/compile-fail/deriving-no-inner-impl-error-message.rs +++ b/src/test/compile-fail/deriving-no-inner-impl-error-message.rs @@ -10,12 +10,12 @@ struct NoCloneOrEq; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct E { x: NoCloneOrEq //~ ERROR binary operation `==` cannot be applied to type `NoCloneOrEq` //~^ ERROR binary operation `!=` cannot be applied to type `NoCloneOrEq` } -#[deriving(Clone)] +#[derive(Clone)] struct C { x: NoCloneOrEq //~^ ERROR the trait `core::clone::Clone` is not implemented for the type `NoCloneOrEq` diff --git a/src/test/compile-fail/deriving-non-type.rs b/src/test/compile-fail/deriving-non-type.rs index 8226bba42b0e1..717ce6e11efba 100644 --- a/src/test/compile-fail/deriving-non-type.rs +++ b/src/test/compile-fail/deriving-non-type.rs @@ -12,29 +12,29 @@ struct S; -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums trait T { } -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums impl S { } -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums impl T for S { } -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums static s: uint = 0u; -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums const c: uint = 0u; -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums mod m { } -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums extern "C" { } -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums type A = uint; -#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums +#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums fn main() { } diff --git a/src/test/compile-fail/deriving-primitive.rs b/src/test/compile-fail/deriving-primitive.rs index 1af0193ca4789..a3c6c8672c837 100644 --- a/src/test/compile-fail/deriving-primitive.rs +++ b/src/test/compile-fail/deriving-primitive.rs @@ -11,22 +11,22 @@ use std::num::FromPrimitive; use std::int; -#[deriving(FromPrimitive)] +#[derive(FromPrimitive)] struct A { x: int } //~^^ ERROR `FromPrimitive` cannot be derived for structs //~^^^ ERROR `FromPrimitive` cannot be derived for structs -#[deriving(FromPrimitive)] +#[derive(FromPrimitive)] struct B(int); //~^^ ERROR `FromPrimitive` cannot be derived for structs //~^^^ ERROR `FromPrimitive` cannot be derived for structs -#[deriving(FromPrimitive)] +#[derive(FromPrimitive)] enum C { Foo(int), Bar(uint) } //~^^ ERROR `FromPrimitive` cannot be derived for enum variants with arguments //~^^^ ERROR `FromPrimitive` cannot be derived for enum variants with arguments -#[deriving(FromPrimitive)] +#[derive(FromPrimitive)] enum D { Baz { x: int } } //~^^ ERROR `FromPrimitive` cannot be derived for enums with struct variants //~^^^ ERROR `FromPrimitive` cannot be derived for enums with struct variants diff --git a/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs index 1abafb84dd2db..9badb5b262dfe 100644 --- a/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Clone)] +#[derive(Clone)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Clone-enum.rs b/src/test/compile-fail/deriving-span-Clone-enum.rs index 50badaeea00c6..6b71610778c19 100644 --- a/src/test/compile-fail/deriving-span-Clone-enum.rs +++ b/src/test/compile-fail/deriving-span-Clone-enum.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Clone)] +#[derive(Clone)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Clone-struct.rs b/src/test/compile-fail/deriving-span-Clone-struct.rs index 49530afec0543..845da771de826 100644 --- a/src/test/compile-fail/deriving-span-Clone-struct.rs +++ b/src/test/compile-fail/deriving-span-Clone-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Clone)] +#[derive(Clone)] struct Struct { x: Error //~ ERROR } diff --git a/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs b/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs index 27e281bb220b6..698e5a79bef29 100644 --- a/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Clone-tuple-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Clone)] +#[derive(Clone)] struct Struct( Error //~ ERROR ); diff --git a/src/test/compile-fail/deriving-span-Default-struct.rs b/src/test/compile-fail/deriving-span-Default-struct.rs index a75d909c06d2b..ac718519fe672 100644 --- a/src/test/compile-fail/deriving-span-Default-struct.rs +++ b/src/test/compile-fail/deriving-span-Default-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Default)] +#[derive(Default)] struct Struct { x: Error //~ ERROR `core::default::Default` is not implemented } diff --git a/src/test/compile-fail/deriving-span-Default-tuple-struct.rs b/src/test/compile-fail/deriving-span-Default-tuple-struct.rs index 8df6acd27044c..d0b9a7a3db9d3 100644 --- a/src/test/compile-fail/deriving-span-Default-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Default-tuple-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Default)] +#[derive(Default)] struct Struct( Error //~ ERROR ); diff --git a/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs index fb94799caba6d..d9f4bfe10280b 100644 --- a/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Hash)] +#[derive(Hash)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Hash-enum.rs b/src/test/compile-fail/deriving-span-Hash-enum.rs index d4100badcdb85..1f5a5d5201fb7 100644 --- a/src/test/compile-fail/deriving-span-Hash-enum.rs +++ b/src/test/compile-fail/deriving-span-Hash-enum.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Hash)] +#[derive(Hash)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Hash-struct.rs b/src/test/compile-fail/deriving-span-Hash-struct.rs index 8b0ec01283c86..55a5e9ee6b385 100644 --- a/src/test/compile-fail/deriving-span-Hash-struct.rs +++ b/src/test/compile-fail/deriving-span-Hash-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Hash)] +#[derive(Hash)] struct Struct { x: Error //~ ERROR } diff --git a/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs b/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs index 8ed8350e55791..5c81c57dbcc4e 100644 --- a/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Hash-tuple-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Hash)] +#[derive(Hash)] struct Struct( Error //~ ERROR ); diff --git a/src/test/compile-fail/deriving-span-PartialEq-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-PartialEq-enum-struct-variant.rs index f9ce978a05762..c340ad8a46a04 100644 --- a/src/test/compile-fail/deriving-span-PartialEq-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-PartialEq-enum-struct-variant.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(PartialEq)] +#[derive(PartialEq)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-PartialEq-enum.rs b/src/test/compile-fail/deriving-span-PartialEq-enum.rs index 7756e9bfbb68e..9051a6371fc8d 100644 --- a/src/test/compile-fail/deriving-span-PartialEq-enum.rs +++ b/src/test/compile-fail/deriving-span-PartialEq-enum.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(PartialEq)] +#[derive(PartialEq)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-PartialEq-struct.rs b/src/test/compile-fail/deriving-span-PartialEq-struct.rs index 43685a5b0ef52..310d4ecd03f3a 100644 --- a/src/test/compile-fail/deriving-span-PartialEq-struct.rs +++ b/src/test/compile-fail/deriving-span-PartialEq-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Struct { x: Error //~ ERROR //~^ ERROR diff --git a/src/test/compile-fail/deriving-span-PartialEq-tuple-struct.rs b/src/test/compile-fail/deriving-span-PartialEq-tuple-struct.rs index b84b8b4a658c3..9b6df0e77e1e0 100644 --- a/src/test/compile-fail/deriving-span-PartialEq-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-PartialEq-tuple-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Struct( Error //~ ERROR //~^ ERROR diff --git a/src/test/compile-fail/deriving-span-PartialOrd-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-PartialOrd-enum-struct-variant.rs index 810f0f350f3a3..5a2d2063d1412 100644 --- a/src/test/compile-fail/deriving-span-PartialOrd-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-PartialOrd-enum-struct-variant.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Error; -#[deriving(PartialOrd,PartialEq)] +#[derive(PartialOrd,PartialEq)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-PartialOrd-enum.rs b/src/test/compile-fail/deriving-span-PartialOrd-enum.rs index 7ae2bbf8eb5c7..9341b6c3e8b84 100644 --- a/src/test/compile-fail/deriving-span-PartialOrd-enum.rs +++ b/src/test/compile-fail/deriving-span-PartialOrd-enum.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Error; -#[deriving(PartialOrd,PartialEq)] +#[derive(PartialOrd,PartialEq)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-PartialOrd-struct.rs b/src/test/compile-fail/deriving-span-PartialOrd-struct.rs index c5b008da884a8..8a707566efa19 100644 --- a/src/test/compile-fail/deriving-span-PartialOrd-struct.rs +++ b/src/test/compile-fail/deriving-span-PartialOrd-struct.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Error; -#[deriving(PartialOrd,PartialEq)] +#[derive(PartialOrd,PartialEq)] struct Struct { x: Error //~ ERROR //~^ ERROR diff --git a/src/test/compile-fail/deriving-span-PartialOrd-tuple-struct.rs b/src/test/compile-fail/deriving-span-PartialOrd-tuple-struct.rs index f282943bba337..ae1b8b44379a7 100644 --- a/src/test/compile-fail/deriving-span-PartialOrd-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-PartialOrd-tuple-struct.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Error; -#[deriving(PartialOrd,PartialEq)] +#[derive(PartialOrd,PartialEq)] struct Struct( Error //~ ERROR //~^ ERROR diff --git a/src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs index c44abc2313a08..4d3542c586b0a 100644 --- a/src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Rand)] +#[derive(Rand)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Rand-enum.rs b/src/test/compile-fail/deriving-span-Rand-enum.rs index fc03b99983d99..dcfdbdc8062ce 100644 --- a/src/test/compile-fail/deriving-span-Rand-enum.rs +++ b/src/test/compile-fail/deriving-span-Rand-enum.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Rand)] +#[derive(Rand)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Rand-struct.rs b/src/test/compile-fail/deriving-span-Rand-struct.rs index 36e1e52139397..73d89693b2bc4 100644 --- a/src/test/compile-fail/deriving-span-Rand-struct.rs +++ b/src/test/compile-fail/deriving-span-Rand-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Rand)] +#[derive(Rand)] struct Struct { x: Error //~ ERROR } diff --git a/src/test/compile-fail/deriving-span-Rand-tuple-struct.rs b/src/test/compile-fail/deriving-span-Rand-tuple-struct.rs index ffa26061833fa..8038bf3ff0925 100644 --- a/src/test/compile-fail/deriving-span-Rand-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Rand-tuple-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Rand)] +#[derive(Rand)] struct Struct( Error //~ ERROR ); diff --git a/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs index fa1cfc3de5ba3..aefc990c187c1 100644 --- a/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Show)] +#[derive(Show)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Show-enum.rs b/src/test/compile-fail/deriving-span-Show-enum.rs index 9b1dccf7df5a3..bdd2c21a1b6a9 100644 --- a/src/test/compile-fail/deriving-span-Show-enum.rs +++ b/src/test/compile-fail/deriving-span-Show-enum.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Show)] +#[derive(Show)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-Show-struct.rs b/src/test/compile-fail/deriving-span-Show-struct.rs index 8acb6875d53a8..f76317e62b42b 100644 --- a/src/test/compile-fail/deriving-span-Show-struct.rs +++ b/src/test/compile-fail/deriving-span-Show-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Show)] +#[derive(Show)] struct Struct { x: Error //~ ERROR } diff --git a/src/test/compile-fail/deriving-span-Show-tuple-struct.rs b/src/test/compile-fail/deriving-span-Show-tuple-struct.rs index bcbced125ef14..cb64a438e0bb7 100644 --- a/src/test/compile-fail/deriving-span-Show-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Show-tuple-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Show)] +#[derive(Show)] struct Struct( Error //~ ERROR ); diff --git a/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs index 25add55ae4bfc..6994aa76fff02 100644 --- a/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Error; -#[deriving(Eq,PartialEq)] +#[derive(Eq,PartialEq)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-TotalEq-enum.rs b/src/test/compile-fail/deriving-span-TotalEq-enum.rs index e58121f2cb081..279368d64ab95 100644 --- a/src/test/compile-fail/deriving-span-TotalEq-enum.rs +++ b/src/test/compile-fail/deriving-span-TotalEq-enum.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Error; -#[deriving(Eq,PartialEq)] +#[derive(Eq,PartialEq)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-TotalEq-struct.rs b/src/test/compile-fail/deriving-span-TotalEq-struct.rs index 0637c6e305cfe..8672e8e050ea6 100644 --- a/src/test/compile-fail/deriving-span-TotalEq-struct.rs +++ b/src/test/compile-fail/deriving-span-TotalEq-struct.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Error; -#[deriving(Eq,PartialEq)] +#[derive(Eq,PartialEq)] struct Struct { x: Error //~ ERROR } diff --git a/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs b/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs index 3a2cbb11f53fb..e79b3b97410fe 100644 --- a/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Error; -#[deriving(Eq,PartialEq)] +#[derive(Eq,PartialEq)] struct Struct( Error //~ ERROR ); diff --git a/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs index 3b4f4e1080d40..6d5e1fb75d48e 100644 --- a/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs +++ b/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(Eq,PartialOrd,PartialEq)] +#[derive(Eq,PartialOrd,PartialEq)] struct Error; -#[deriving(Ord,Eq,PartialOrd,PartialEq)] +#[derive(Ord,Eq,PartialOrd,PartialEq)] enum Enum { A { x: Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-TotalOrd-enum.rs b/src/test/compile-fail/deriving-span-TotalOrd-enum.rs index 02a55fdfbb24c..5b34290133488 100644 --- a/src/test/compile-fail/deriving-span-TotalOrd-enum.rs +++ b/src/test/compile-fail/deriving-span-TotalOrd-enum.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(Eq,PartialOrd,PartialEq)] +#[derive(Eq,PartialOrd,PartialEq)] struct Error; -#[deriving(Ord,Eq,PartialOrd,PartialEq)] +#[derive(Ord,Eq,PartialOrd,PartialEq)] enum Enum { A( Error //~ ERROR diff --git a/src/test/compile-fail/deriving-span-TotalOrd-struct.rs b/src/test/compile-fail/deriving-span-TotalOrd-struct.rs index 7cf3ad57f4701..61d9d8a76a985 100644 --- a/src/test/compile-fail/deriving-span-TotalOrd-struct.rs +++ b/src/test/compile-fail/deriving-span-TotalOrd-struct.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(Eq,PartialOrd,PartialEq)] +#[derive(Eq,PartialOrd,PartialEq)] struct Error; -#[deriving(Ord,Eq,PartialOrd,PartialEq)] +#[derive(Ord,Eq,PartialOrd,PartialEq)] struct Struct { x: Error //~ ERROR } diff --git a/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs b/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs index 7b8d1d3ecd04a..caef79687562a 100644 --- a/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs @@ -12,10 +12,10 @@ extern crate rand; -#[deriving(Eq,PartialOrd,PartialEq)] +#[derive(Eq,PartialOrd,PartialEq)] struct Error; -#[deriving(Ord,Eq,PartialOrd,PartialEq)] +#[derive(Ord,Eq,PartialOrd,PartialEq)] struct Struct( Error //~ ERROR ); diff --git a/src/test/compile-fail/deriving-span-Zero-struct.rs b/src/test/compile-fail/deriving-span-Zero-struct.rs index 302fecd518b86..6b09c36523541 100644 --- a/src/test/compile-fail/deriving-span-Zero-struct.rs +++ b/src/test/compile-fail/deriving-span-Zero-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Zero)] //~ ERROR not implemented +#[derive(Zero)] //~ ERROR not implemented struct Struct { x: Error } diff --git a/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs b/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs index 05b81ce325113..c11af72f5c983 100644 --- a/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs +++ b/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs @@ -15,7 +15,7 @@ extern crate rand; struct Error; -#[deriving(Zero)] //~ ERROR not implemented +#[derive(Zero)] //~ ERROR not implemented struct Struct( Error ); diff --git a/src/test/compile-fail/doc-before-attr.rs b/src/test/compile-fail/doc-before-attr.rs index adc060f513f90..7ee7e196b6b07 100644 --- a/src/test/compile-fail/doc-before-attr.rs +++ b/src/test/compile-fail/doc-before-attr.rs @@ -9,4 +9,4 @@ // except according to those terms. /// hi -#[deriving(Show)] //~ERROR expected item after attributes +#[derive(Show)] //~ERROR expected item after attributes diff --git a/src/test/compile-fail/dst-bad-assign-2.rs b/src/test/compile-fail/dst-bad-assign-2.rs index 112a424427a86..fcc08cfcb1680 100644 --- a/src/test/compile-fail/dst-bad-assign-2.rs +++ b/src/test/compile-fail/dst-bad-assign-2.rs @@ -16,10 +16,10 @@ struct Fat { ptr: T } -#[deriving(PartialEq,Eq)] +#[derive(PartialEq,Eq)] struct Bar; -#[deriving(PartialEq,Eq)] +#[derive(PartialEq,Eq)] struct Bar1 { f: int } diff --git a/src/test/compile-fail/dst-bad-assign.rs b/src/test/compile-fail/dst-bad-assign.rs index f18f4a36640c9..eb54f3f8e781f 100644 --- a/src/test/compile-fail/dst-bad-assign.rs +++ b/src/test/compile-fail/dst-bad-assign.rs @@ -16,10 +16,10 @@ struct Fat { ptr: T } -#[deriving(PartialEq,Eq)] +#[derive(PartialEq,Eq)] struct Bar; -#[deriving(PartialEq,Eq)] +#[derive(PartialEq,Eq)] struct Bar1 { f: int } diff --git a/src/test/compile-fail/issue-17728.rs b/src/test/compile-fail/issue-17728.rs index 50b0a1a20c24c..96f252967a8d0 100644 --- a/src/test/compile-fail/issue-17728.rs +++ b/src/test/compile-fail/issue-17728.rs @@ -30,7 +30,7 @@ trait TraversesWorld { } -#[deriving(Show, Eq, PartialEq, Hash)] +#[derive(Show, Eq, PartialEq, Hash)] enum RoomDirection { West, East, diff --git a/src/test/compile-fail/issue-17905.rs b/src/test/compile-fail/issue-17905.rs index 2f56b494f32c0..2b5c0b7de2f9b 100644 --- a/src/test/compile-fail/issue-17905.rs +++ b/src/test/compile-fail/issue-17905.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct Pair (T, V); impl Pair< diff --git a/src/test/compile-fail/issue-3344.rs b/src/test/compile-fail/issue-3344.rs index b88272ed4666e..27a91f891a2df 100644 --- a/src/test/compile-fail/issue-3344.rs +++ b/src/test/compile-fail/issue-3344.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq)] +#[derive(PartialEq)] struct thing(uint); impl PartialOrd for thing { //~ ERROR not all trait items implemented, missing: `partial_cmp` fn le(&self, other: &thing) -> bool { true } diff --git a/src/test/compile-fail/issue-3521.rs b/src/test/compile-fail/issue-3521.rs index f3d26c50cc332..67ab5508ec2cd 100644 --- a/src/test/compile-fail/issue-3521.rs +++ b/src/test/compile-fail/issue-3521.rs @@ -11,7 +11,7 @@ fn main() { let foo = 100; - #[deriving(Show)] + #[derive(Show)] enum Stuff { Bar = foo //~ ERROR attempt to use a non-constant value in a constant } diff --git a/src/test/compile-fail/lint-raw-ptr-deriving.rs b/src/test/compile-fail/lint-raw-ptr-deriving.rs index 72632b56706c4..6fe8862d77e58 100644 --- a/src/test/compile-fail/lint-raw-ptr-deriving.rs +++ b/src/test/compile-fail/lint-raw-ptr-deriving.rs @@ -11,24 +11,24 @@ #![allow(dead_code)] #![deny(raw_pointer_deriving)] -#[deriving(Clone)] +#[derive(Clone)] struct Foo { - x: *const int //~ ERROR use of `#[deriving]` with a raw pointer + x: *const int //~ ERROR use of `#[derive]` with a raw pointer } -#[deriving(Clone)] -struct Bar(*mut int); //~ ERROR use of `#[deriving]` with a raw pointer +#[derive(Clone)] +struct Bar(*mut int); //~ ERROR use of `#[derive]` with a raw pointer -#[deriving(Clone)] +#[derive(Clone)] enum Baz { - A(*const int), //~ ERROR use of `#[deriving]` with a raw pointer - B { x: *mut int } //~ ERROR use of `#[deriving]` with a raw pointer + A(*const int), //~ ERROR use of `#[derive]` with a raw pointer + B { x: *mut int } //~ ERROR use of `#[derive]` with a raw pointer } -#[deriving(Clone)] +#[derive(Clone)] struct Buzz { - x: (*const int, //~ ERROR use of `#[deriving]` with a raw pointer - *const uint) //~ ERROR use of `#[deriving]` with a raw pointer + x: (*const int, //~ ERROR use of `#[derive]` with a raw pointer + *const uint) //~ ERROR use of `#[derive]` with a raw pointer } fn main() {} diff --git a/src/test/compile-fail/lint-unnecessary-parens.rs b/src/test/compile-fail/lint-unnecessary-parens.rs index b71effa6f861b..1c7a2d7e9d5e7 100644 --- a/src/test/compile-fail/lint-unnecessary-parens.rs +++ b/src/test/compile-fail/lint-unnecessary-parens.rs @@ -10,7 +10,7 @@ #![deny(unused_parens)] -#[deriving(Eq, PartialEq)] +#[derive(Eq, PartialEq)] struct X { y: bool } impl X { fn foo(&self) -> bool { self.y } diff --git a/src/test/compile-fail/liveness-use-after-send.rs b/src/test/compile-fail/liveness-use-after-send.rs index 1ad696503e7f9..f25d2a9b00c70 100644 --- a/src/test/compile-fail/liveness-use-after-send.rs +++ b/src/test/compile-fail/liveness-use-after-send.rs @@ -14,7 +14,7 @@ fn send(ch: _chan, data: T) { panic!(); } -#[deriving(Show)] +#[derive(Show)] struct _chan(int); // Tests that "log(debug, message);" is flagged as using diff --git a/src/test/compile-fail/macros-nonfatal-errors.rs b/src/test/compile-fail/macros-nonfatal-errors.rs index 8bd26a3a5e098..f97cad559a15d 100644 --- a/src/test/compile-fail/macros-nonfatal-errors.rs +++ b/src/test/compile-fail/macros-nonfatal-errors.rs @@ -14,7 +14,7 @@ #![feature(asm)] #![feature(trace_macros, concat_idents)] -#[deriving(Default, //~ ERROR +#[derive(Default, //~ ERROR Rand, //~ ERROR Zero)] //~ ERROR enum CantDeriveThose {} diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs index 48747c7ce1da7..f487ecf9f4582 100644 --- a/src/test/compile-fail/no-send-res-ports.rs +++ b/src/test/compile-fail/no-send-res-ports.rs @@ -13,11 +13,11 @@ use std::task; use std::rc::Rc; -#[deriving(Show)] +#[derive(Show)] struct Port(Rc); fn main() { - #[deriving(Show)] + #[derive(Show)] struct foo { _x: Port<()>, } diff --git a/src/test/compile-fail/noncopyable-class.rs b/src/test/compile-fail/noncopyable-class.rs index bf762eaa80f5a..aceec2aafdfa3 100644 --- a/src/test/compile-fail/noncopyable-class.rs +++ b/src/test/compile-fail/noncopyable-class.rs @@ -11,7 +11,7 @@ // Test that a class with a non-copyable field can't be // copied -#[deriving(Show)] +#[derive(Show)] struct bar { x: int, } @@ -26,7 +26,7 @@ fn bar(x:int) -> bar { } } -#[deriving(Show)] +#[derive(Show)] struct foo { i: int, j: bar, diff --git a/src/test/compile-fail/nonscalar-cast.rs b/src/test/compile-fail/nonscalar-cast.rs index 346661e3c1f52..728f66a6aa76c 100644 --- a/src/test/compile-fail/nonscalar-cast.rs +++ b/src/test/compile-fail/nonscalar-cast.rs @@ -10,7 +10,7 @@ // error-pattern:non-scalar cast -#[deriving(Show)] +#[derive(Show)] struct foo { x: int } diff --git a/src/test/compile-fail/packed-struct-transmute.rs b/src/test/compile-fail/packed-struct-transmute.rs index 9c8e8193319de..91c6776e52edd 100644 --- a/src/test/compile-fail/packed-struct-transmute.rs +++ b/src/test/compile-fail/packed-struct-transmute.rs @@ -23,7 +23,7 @@ struct Foo { baz: uint } -#[deriving(Show)] +#[derive(Show)] struct Oof { rab: u8, zab: uint diff --git a/src/test/compile-fail/unique-pinned-nocopy.rs b/src/test/compile-fail/unique-pinned-nocopy.rs index 0e1e66b40ce33..704d8c568c421 100644 --- a/src/test/compile-fail/unique-pinned-nocopy.rs +++ b/src/test/compile-fail/unique-pinned-nocopy.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct r { b: bool, } diff --git a/src/test/compile-fail/unique-vec-res.rs b/src/test/compile-fail/unique-vec-res.rs index ba39f3e0d176d..8aabc9b042f7e 100644 --- a/src/test/compile-fail/unique-vec-res.rs +++ b/src/test/compile-fail/unique-vec-res.rs @@ -12,7 +12,7 @@ use std::cell::Cell; -#[deriving(Show)] +#[derive(Show)] struct r<'a> { i: &'a Cell, } diff --git a/src/test/compile-fail/use-mod-2.rs b/src/test/compile-fail/use-mod-2.rs index 12d4531078dcd..e98224bee02f8 100644 --- a/src/test/compile-fail/use-mod-2.rs +++ b/src/test/compile-fail/use-mod-2.rs @@ -9,10 +9,10 @@ // except according to those terms. mod foo { - use self::{mod}; + use self::{self}; //~^ ERROR unresolved import `self`. There is no `self` in `???` - use super::{mod}; + use super::{self}; //~^ ERROR unresolved import `super`. There is no `super` in `???` } diff --git a/src/test/compile-fail/use-mod-3.rs b/src/test/compile-fail/use-mod-3.rs index b6b86a9993db1..040674fd6d93b 100644 --- a/src/test/compile-fail/use-mod-3.rs +++ b/src/test/compile-fail/use-mod-3.rs @@ -9,7 +9,7 @@ // except according to those terms. use foo::bar::{ - mod //~ ERROR module `bar` is private + self //~ ERROR module `bar` is private }; use foo::bar::{ Bar //~ ERROR type `Bar` is inaccessible diff --git a/src/test/compile-fail/use-mod.rs b/src/test/compile-fail/use-mod.rs index b2b0eb21ace48..493991835e8a2 100644 --- a/src/test/compile-fail/use-mod.rs +++ b/src/test/compile-fail/use-mod.rs @@ -9,18 +9,18 @@ // except according to those terms. use foo::bar::{ - mod, -//~^ ERROR `mod` import can only appear once in the list + self, +//~^ ERROR `self` import can only appear once in the list Bar, - mod -//~^ NOTE another `mod` import appears here + self +//~^ NOTE another `self` import appears here }; -use {mod}; -//~^ ERROR `mod` import can only appear in an import list with a non-empty prefix +use {self}; +//~^ ERROR `self` import can only appear in an import list with a non-empty prefix -use foo::mod; -//~^ ERROR `mod` imports are only allowed within a { } list +use foo::self; +//~^ ERROR `self` imports are only allowed within a { } list mod foo { pub mod bar { diff --git a/src/test/compile-fail/vec-res-add.rs b/src/test/compile-fail/vec-res-add.rs index 6221806642c99..28a7ceeeaa2cd 100644 --- a/src/test/compile-fail/vec-res-add.rs +++ b/src/test/compile-fail/vec-res-add.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct r { i:int } diff --git a/src/test/debuginfo/by-value-non-immediate-argument.rs b/src/test/debuginfo/by-value-non-immediate-argument.rs index b0c5b2f21b95c..8ac8d5970f318 100644 --- a/src/test/debuginfo/by-value-non-immediate-argument.rs +++ b/src/test/debuginfo/by-value-non-immediate-argument.rs @@ -73,13 +73,13 @@ #![omit_gdb_pretty_printer_section] -#[deriving(Clone)] +#[derive(Clone)] struct Struct { a: int, b: f64 } -#[deriving(Clone)] +#[derive(Clone)] struct StructStruct { a: Struct, b: Struct diff --git a/src/test/debuginfo/c-style-enum.rs b/src/test/debuginfo/c-style-enum.rs index b62a8167eaf07..ad7c860c8b9be 100644 --- a/src/test/debuginfo/c-style-enum.rs +++ b/src/test/debuginfo/c-style-enum.rs @@ -105,21 +105,21 @@ use self::AutoDiscriminant::{One, Two, Three}; use self::ManualDiscriminant::{OneHundred, OneThousand, OneMillion}; use self::SingleVariant::TheOnlyVariant; -#[deriving(Copy)] +#[derive(Copy)] enum AutoDiscriminant { One, Two, Three } -#[deriving(Copy)] +#[derive(Copy)] enum ManualDiscriminant { OneHundred = 100, OneThousand = 1000, OneMillion = 1000000 } -#[deriving(Copy)] +#[derive(Copy)] enum SingleVariant { TheOnlyVariant } diff --git a/src/test/debuginfo/generic-function.rs b/src/test/debuginfo/generic-function.rs index cefe67970e959..b2fdb708db559 100644 --- a/src/test/debuginfo/generic-function.rs +++ b/src/test/debuginfo/generic-function.rs @@ -72,7 +72,7 @@ #![omit_gdb_pretty_printer_section] -#[deriving(Clone)] +#[derive(Clone)] struct Struct { a: int, b: f64 diff --git a/src/test/run-make/extern-fn-with-packed-struct/test.rs b/src/test/run-make/extern-fn-with-packed-struct/test.rs index 12d961bd59ebf..b38db4c9eb2c6 100644 --- a/src/test/run-make/extern-fn-with-packed-struct/test.rs +++ b/src/test/run-make/extern-fn-with-packed-struct/test.rs @@ -9,7 +9,7 @@ // except according to those terms. #[repr(packed)] -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Foo { a: i8, b: i16, diff --git a/src/test/run-make/pretty-expanded/input.rs b/src/test/run-make/pretty-expanded/input.rs index 0fb74af56daca..b6137c3eba91b 100644 --- a/src/test/run-make/pretty-expanded/input.rs +++ b/src/test/run-make/pretty-expanded/input.rs @@ -14,9 +14,9 @@ extern crate serialize; -#[deriving(Encodable)] pub struct A; -#[deriving(Encodable)] pub struct B(int); -#[deriving(Encodable)] pub struct C { x: int } -#[deriving(Encodable)] pub enum D {} -#[deriving(Encodable)] pub enum E { y } -#[deriving(Encodable)] pub enum F { z(int) } +#[derive(Encodable)] pub struct A; +#[derive(Encodable)] pub struct B(int); +#[derive(Encodable)] pub struct C { x: int } +#[derive(Encodable)] pub enum D {} +#[derive(Encodable)] pub enum E { y } +#[derive(Encodable)] pub enum F { z(int) } diff --git a/src/test/run-make/rustdoc-hidden-line/foo.rs b/src/test/run-make/rustdoc-hidden-line/foo.rs index c402da7987d5a..78dcaebda4bc4 100644 --- a/src/test/run-make/rustdoc-hidden-line/foo.rs +++ b/src/test/run-make/rustdoc-hidden-line/foo.rs @@ -10,16 +10,16 @@ #![crate_name="foo"] -/// The '# ' lines should be removed from the output, but the #[deriving] should be +/// The '# ' lines should be removed from the output, but the #[derive] should be /// retained. /// /// ```rust /// mod to_make_deriving_work { // FIXME #4913 /// -/// # #[deriving(PartialEq)] // invisible +/// # #[derive(PartialEq)] // invisible /// # struct Foo; // invisible /// -/// #[deriving(PartialEq)] // Bar +/// #[derive(PartialEq)] // Bar /// struct Bar(Foo); /// /// fn test() { diff --git a/src/test/run-make/rustdoc-hidden-line/verify.sh b/src/test/run-make/rustdoc-hidden-line/verify.sh index 9c905f37d317c..9f28b55b13396 100755 --- a/src/test/run-make/rustdoc-hidden-line/verify.sh +++ b/src/test/run-make/rustdoc-hidden-line/verify.sh @@ -3,6 +3,6 @@ file="$1/doc/foo/fn.foo.html" grep -v 'invisible' $file && -grep '#.*\[.*deriving.*(.*Eq.*).*\].*//.*Bar' $file +grep '#.*\[.*derive.*(.*Eq.*).*\].*//.*Bar' $file exit $? diff --git a/src/test/run-pass-fulldeps/macro-crate.rs b/src/test/run-pass-fulldeps/macro-crate.rs index e9b712c914dc5..0f5e2cb3b6b46 100644 --- a/src/test/run-pass-fulldeps/macro-crate.rs +++ b/src/test/run-pass-fulldeps/macro-crate.rs @@ -17,7 +17,7 @@ extern crate macro_crate_test; #[into_foo] -#[deriving(PartialEq, Clone, Show)] +#[derive(PartialEq, Clone, Show)] fn foo() -> AFakeTypeThatHadBetterGoAway {} pub fn main() { diff --git a/src/test/run-pass-fulldeps/quote-tokens.rs b/src/test/run-pass-fulldeps/quote-tokens.rs index dc14e3c707c65..e76c379177b99 100644 --- a/src/test/run-pass-fulldeps/quote-tokens.rs +++ b/src/test/run-pass-fulldeps/quote-tokens.rs @@ -33,7 +33,7 @@ fn syntax_extension(cx: &ExtCtxt) { let _g: P = quote_expr!(cx, true); let _h: P = quote_expr!(cx, 'a'); - let i: Option> = quote_item!(cx, #[deriving(Eq)] struct Foo; ); + let i: Option> = quote_item!(cx, #[derive(Eq)] struct Foo; ); assert!(i.is_some()); let _j: P = quote_method!(cx, fn foo(&self) {}); diff --git a/src/test/run-pass/assert-eq-macro-success.rs b/src/test/run-pass/assert-eq-macro-success.rs index 49a374f343c6f..3da245efd79a8 100644 --- a/src/test/run-pass/assert-eq-macro-success.rs +++ b/src/test/run-pass/assert-eq-macro-success.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Point { x : int } pub fn main() { diff --git a/src/test/run-pass/auto-encode.rs b/src/test/run-pass/auto-encode.rs index 3fc2ed5468a6e..24df95ffd3cb6 100644 --- a/src/test/run-pass/auto-encode.rs +++ b/src/test/run-pass/auto-encode.rs @@ -41,7 +41,7 @@ fn test_rbml<'a, 'b, A: assert!(*a1 == a2); } -#[deriving(Decodable, Encodable)] +#[derive(Decodable, Encodable)] enum Expr { Val(uint), Plus(@Expr, @Expr), @@ -108,26 +108,26 @@ impl cmp::Eq for CLike { fn ne(&self, other: &CLike) -> bool { !self.eq(other) } } -#[deriving(Decodable, Encodable, Eq)] +#[derive(Decodable, Encodable, Eq)] struct Spanned { lo: uint, hi: uint, node: T, } -#[deriving(Decodable, Encodable)] +#[derive(Decodable, Encodable)] struct SomeStruct { v: Vec } -#[deriving(Decodable, Encodable)] +#[derive(Decodable, Encodable)] struct Point {x: uint, y: uint} -#[deriving(Decodable, Encodable)] +#[derive(Decodable, Encodable)] enum Quark { Top(T), Bottom(T) } -#[deriving(Decodable, Encodable)] +#[derive(Decodable, Encodable)] enum CLike { A, B, C } pub fn main() { diff --git a/src/test/run-pass/auto-instantiate.rs b/src/test/run-pass/auto-instantiate.rs index 6195c259414b5..3c1e1f765803b 100644 --- a/src/test/run-pass/auto-instantiate.rs +++ b/src/test/run-pass/auto-instantiate.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct Pair { a: T, b: U } struct Triple { x: int, y: int, z: int } diff --git a/src/test/run-pass/binops.rs b/src/test/run-pass/binops.rs index 3997c5d3d29b8..dc92910c927a0 100644 --- a/src/test/run-pass/binops.rs +++ b/src/test/run-pass/binops.rs @@ -59,7 +59,7 @@ fn test_ptr() { } } -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct p { x: int, y: int, diff --git a/src/test/run-pass/borrowck-mut-uniq.rs b/src/test/run-pass/borrowck-mut-uniq.rs index e644c49366d44..176c7277efddc 100644 --- a/src/test/run-pass/borrowck-mut-uniq.rs +++ b/src/test/run-pass/borrowck-mut-uniq.rs @@ -10,7 +10,7 @@ use std::mem::swap; -#[deriving(Show)] +#[derive(Show)] struct Ints {sum: Box, values: Vec } fn add_int(x: &mut Ints, v: int) { diff --git a/src/test/run-pass/builtin-superkinds-capabilities-xc.rs b/src/test/run-pass/builtin-superkinds-capabilities-xc.rs index c2b874c61a77f..efea4ffe9be43 100644 --- a/src/test/run-pass/builtin-superkinds-capabilities-xc.rs +++ b/src/test/run-pass/builtin-superkinds-capabilities-xc.rs @@ -17,7 +17,7 @@ extern crate trait_superkinds_in_metadata; use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare}; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct X(T); impl RequiresShare for X { } diff --git a/src/test/run-pass/class-cast-to-trait-multiple-types.rs b/src/test/run-pass/class-cast-to-trait-multiple-types.rs index 2d5fe2e86df90..ecbbb3199b9af 100644 --- a/src/test/run-pass/class-cast-to-trait-multiple-types.rs +++ b/src/test/run-pass/class-cast-to-trait-multiple-types.rs @@ -47,7 +47,7 @@ fn dog() -> dog { } } -#[deriving(Clone)] +#[derive(Clone)] struct cat { meows: uint, diff --git a/src/test/run-pass/class-impl-very-parameterized-trait.rs b/src/test/run-pass/class-impl-very-parameterized-trait.rs index 2a9756d7714cd..629cf7c4ef77b 100644 --- a/src/test/run-pass/class-impl-very-parameterized-trait.rs +++ b/src/test/run-pass/class-impl-very-parameterized-trait.rs @@ -11,7 +11,7 @@ use std::cmp; -#[deriving(Show)] +#[derive(Show)] enum cat_type { tuxedo, tabby, tortoiseshell } impl Copy for cat_type {} diff --git a/src/test/run-pass/class-implement-traits.rs b/src/test/run-pass/class-implement-traits.rs index 034ce8626d087..cf08cd2709d56 100644 --- a/src/test/run-pass/class-implement-traits.rs +++ b/src/test/run-pass/class-implement-traits.rs @@ -13,7 +13,7 @@ trait noisy { fn speak(&mut self); } -#[deriving(Clone)] +#[derive(Clone)] struct cat { meows : uint, diff --git a/src/test/run-pass/coerce-to-closure-and-proc.rs b/src/test/run-pass/coerce-to-closure-and-proc.rs index 5a1b401177e01..413717d9226ba 100644 --- a/src/test/run-pass/coerce-to-closure-and-proc.rs +++ b/src/test/run-pass/coerce-to-closure-and-proc.rs @@ -14,10 +14,10 @@ fn id(x: T) -> T { x } -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Foo(T); -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] enum Bar { Baz(T) } diff --git a/src/test/run-pass/coherence-where-clause.rs b/src/test/run-pass/coherence-where-clause.rs index e0d9d569d175d..99c475b72072e 100644 --- a/src/test/run-pass/coherence-where-clause.rs +++ b/src/test/run-pass/coherence-where-clause.rs @@ -23,7 +23,7 @@ impl MyTrait for T } } -#[deriving(Clone,Show,PartialEq)] +#[derive(Clone,Show,PartialEq)] struct MyType { dummy: uint } diff --git a/src/test/run-pass/const-struct.rs b/src/test/run-pass/const-struct.rs index f2db119156960..b2073a8ff28cf 100644 --- a/src/test/run-pass/const-struct.rs +++ b/src/test/run-pass/const-struct.rs @@ -10,7 +10,7 @@ use std::cmp; -#[deriving(Show)] +#[derive(Show)] struct foo { a: int, b: int, c: int } impl cmp::PartialEq for foo { diff --git a/src/test/run-pass/deriving-bounds.rs b/src/test/run-pass/deriving-bounds.rs index 0bf27cfbb2418..6869a60838c09 100644 --- a/src/test/run-pass/deriving-bounds.rs +++ b/src/test/run-pass/deriving-bounds.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Copy)] +#[derive(Copy)] struct Test; pub fn main() {} diff --git a/src/test/run-pass/deriving-clone-enum.rs b/src/test/run-pass/deriving-clone-enum.rs index 875dfa42b5974..ce34852a917a6 100644 --- a/src/test/run-pass/deriving-clone-enum.rs +++ b/src/test/run-pass/deriving-clone-enum.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone)] +#[derive(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 34892fb0a3ba1..e8e65dcb8a9e8 100644 --- a/src/test/run-pass/deriving-clone-generic-enum.rs +++ b/src/test/run-pass/deriving-clone-generic-enum.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone)] +#[derive(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 8b5da617e2819..d340fe9d3fbee 100644 --- a/src/test/run-pass/deriving-clone-generic-struct.rs +++ b/src/test/run-pass/deriving-clone-generic-struct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone)] +#[derive(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 3fbef5d5a7676..ecf1fdc6e5fbf 100644 --- a/src/test/run-pass/deriving-clone-generic-tuple-struct.rs +++ b/src/test/run-pass/deriving-clone-generic-tuple-struct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] struct S(T, ()); pub fn main() { diff --git a/src/test/run-pass/deriving-clone-struct.rs b/src/test/run-pass/deriving-clone-struct.rs index 8e0afad218936..51e615b37021a 100644 --- a/src/test/run-pass/deriving-clone-struct.rs +++ b/src/test/run-pass/deriving-clone-struct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone)] +#[derive(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 1e5c8c80f8c49..e2784c26dbbae 100644 --- a/src/test/run-pass/deriving-clone-tuple-struct.rs +++ b/src/test/run-pass/deriving-clone-tuple-struct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] struct S((), ()); pub fn main() {} diff --git a/src/test/run-pass/deriving-cmp-generic-enum.rs b/src/test/run-pass/deriving-cmp-generic-enum.rs index e8b4eec2668f0..04cb3b7c07647 100644 --- a/src/test/run-pass/deriving-cmp-generic-enum.rs +++ b/src/test/run-pass/deriving-cmp-generic-enum.rs @@ -10,7 +10,7 @@ // no-pretty-expanded FIXME #15189 -#[deriving(PartialEq, Eq, PartialOrd, Ord)] +#[derive(PartialEq, Eq, PartialOrd, Ord)] enum E { E0, E1(T), diff --git a/src/test/run-pass/deriving-cmp-generic-struct-enum.rs b/src/test/run-pass/deriving-cmp-generic-struct-enum.rs index 0c70102d57e20..dbac7fa5bcae6 100644 --- a/src/test/run-pass/deriving-cmp-generic-struct-enum.rs +++ b/src/test/run-pass/deriving-cmp-generic-struct-enum.rs @@ -10,7 +10,7 @@ // no-pretty-expanded FIXME #15189 -#[deriving(PartialEq, Eq, PartialOrd, Ord)] +#[derive(PartialEq, Eq, PartialOrd, Ord)] enum ES { ES1 { x: T }, ES2 { x: T, y: T } diff --git a/src/test/run-pass/deriving-cmp-generic-struct.rs b/src/test/run-pass/deriving-cmp-generic-struct.rs index d1610978e2eb5..cd2cbb2d0a919 100644 --- a/src/test/run-pass/deriving-cmp-generic-struct.rs +++ b/src/test/run-pass/deriving-cmp-generic-struct.rs @@ -10,7 +10,7 @@ // no-pretty-expanded FIXME #15189 -#[deriving(PartialEq, Eq, PartialOrd, Ord)] +#[derive(PartialEq, Eq, PartialOrd, Ord)] struct S { x: T, y: T diff --git a/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs b/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs index 25f62e85ba6f3..0a45b73755eac 100644 --- a/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs +++ b/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs @@ -10,7 +10,7 @@ // no-pretty-expanded FIXME #15189 -#[deriving(PartialEq, Eq, PartialOrd, Ord)] +#[derive(PartialEq, Eq, PartialOrd, Ord)] struct TS(T,T); diff --git a/src/test/run-pass/deriving-cmp-shortcircuit.rs b/src/test/run-pass/deriving-cmp-shortcircuit.rs index b68d8058381d2..0a139667c0e49 100644 --- a/src/test/run-pass/deriving-cmp-shortcircuit.rs +++ b/src/test/run-pass/deriving-cmp-shortcircuit.rs @@ -27,7 +27,7 @@ impl Ord for FailCmp { fn cmp(&self, _: &FailCmp) -> Ordering { panic!("cmp") } } -#[deriving(PartialEq,PartialOrd,Eq,Ord)] +#[derive(PartialEq,PartialOrd,Eq,Ord)] struct ShortCircuit { x: int, y: FailCmp diff --git a/src/test/run-pass/deriving-default-box.rs b/src/test/run-pass/deriving-default-box.rs index aeef55fbbacd8..aea6ebd25975c 100644 --- a/src/test/run-pass/deriving-default-box.rs +++ b/src/test/run-pass/deriving-default-box.rs @@ -10,7 +10,7 @@ use std::default::Default; -#[deriving(Default)] +#[derive(Default)] struct A { foo: Box<[bool]>, } diff --git a/src/test/run-pass/deriving-encodable-decodable-box.rs b/src/test/run-pass/deriving-encodable-decodable-box.rs index e21f64cd74c80..b0c5d88c48e17 100644 --- a/src/test/run-pass/deriving-encodable-decodable-box.rs +++ b/src/test/run-pass/deriving-encodable-decodable-box.rs @@ -13,7 +13,7 @@ extern crate serialize; use serialize::{Encodable, Decodable}; use serialize::json; -#[deriving(Encodable, Decodable)] +#[derive(Encodable, Decodable)] struct A { foo: Box<[bool]>, } diff --git a/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs b/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs index a846f852694d3..1176cc303b7a7 100644 --- a/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs +++ b/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs @@ -9,7 +9,7 @@ // except according to those terms. // This briefly tests the capability of `Cell` and `RefCell` to implement the -// `Encodable` and `Decodable` traits via `#[deriving(Encodable, Decodable)]` +// `Encodable` and `Decodable` traits via `#[derive(Encodable, Decodable)]` extern crate serialize; @@ -17,12 +17,12 @@ use std::cell::{Cell, RefCell}; use serialize::{Encodable, Decodable}; use serialize::json; -#[deriving(Encodable, Decodable)] +#[derive(Encodable, Decodable)] struct A { baz: int } -#[deriving(Encodable, Decodable)] +#[derive(Encodable, Decodable)] struct B { foo: Cell, bar: RefCell, diff --git a/src/test/run-pass/deriving-encodable-decodable.rs b/src/test/run-pass/deriving-encodable-decodable.rs index 7bee4bc7b0d20..2466d0adf7bc3 100644 --- a/src/test/run-pass/deriving-encodable-decodable.rs +++ b/src/test/run-pass/deriving-encodable-decodable.rs @@ -24,20 +24,20 @@ use rbml::writer::Encoder; use rbml::reader::Decoder; use serialize::{Encodable, Decodable}; -#[deriving(Encodable, Decodable, Eq, Rand)] +#[derive(Encodable, Decodable, Eq, Rand)] struct A; -#[deriving(Encodable, Decodable, Eq, Rand)] +#[derive(Encodable, Decodable, Eq, Rand)] struct B(int); -#[deriving(Encodable, Decodable, Eq, Rand)] +#[derive(Encodable, Decodable, Eq, Rand)] struct C(int, int, uint); -#[deriving(Encodable, Decodable, Eq, Rand)] +#[derive(Encodable, Decodable, Eq, Rand)] struct D { a: int, b: uint, } -#[deriving(Encodable, Decodable, Eq, Rand)] +#[derive(Encodable, Decodable, Eq, Rand)] enum E { E1, E2(uint), @@ -45,10 +45,10 @@ enum E { E4{ x: uint }, } -#[deriving(Encodable, Decodable, Eq, Rand)] +#[derive(Encodable, Decodable, Eq, Rand)] enum F { F1 } -#[deriving(Encodable, Decodable, Eq, Rand)] +#[derive(Encodable, Decodable, Eq, Rand)] struct G { t: T } diff --git a/src/test/run-pass/deriving-enum-single-variant.rs b/src/test/run-pass/deriving-enum-single-variant.rs index a9bdcf2734bbc..7ce7c5fd41105 100644 --- a/src/test/run-pass/deriving-enum-single-variant.rs +++ b/src/test/run-pass/deriving-enum-single-variant.rs @@ -10,7 +10,7 @@ pub type task_id = int; -#[deriving(PartialEq)] +#[derive(PartialEq)] pub enum Task { TaskHandle(task_id) } diff --git a/src/test/run-pass/deriving-eq-ord-boxed-slice.rs b/src/test/run-pass/deriving-eq-ord-boxed-slice.rs index b16c2ccb46eb8..6701a32133938 100644 --- a/src/test/run-pass/deriving-eq-ord-boxed-slice.rs +++ b/src/test/run-pass/deriving-eq-ord-boxed-slice.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq, PartialOrd, Eq, Ord)] +#[derive(PartialEq, PartialOrd, Eq, Ord)] struct Foo(Box<[u8]>); pub fn main() { diff --git a/src/test/run-pass/deriving-global.rs b/src/test/run-pass/deriving-global.rs index 2322675661caf..80a6829986d00 100644 --- a/src/test/run-pass/deriving-global.rs +++ b/src/test/run-pass/deriving-global.rs @@ -15,21 +15,21 @@ mod submod { // if any of these are implemented without global calls for any // function calls, then being in a submodule will (correctly) // cause errors about unrecognised module `std` (or `extra`) - #[deriving(PartialEq, PartialOrd, Eq, Ord, + #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Show, Rand, Encodable, Decodable)] enum A { A1(uint), A2(int) } - #[deriving(PartialEq, PartialOrd, Eq, Ord, + #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Show, Rand, Encodable, Decodable)] struct B { x: uint, y: int } - #[deriving(PartialEq, PartialOrd, Eq, Ord, + #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Show, Rand, diff --git a/src/test/run-pass/deriving-hash.rs b/src/test/run-pass/deriving-hash.rs index a7211e77cd05d..ddad703d7dfdb 100644 --- a/src/test/run-pass/deriving-hash.rs +++ b/src/test/run-pass/deriving-hash.rs @@ -12,7 +12,7 @@ use std::hash; use std::hash::Hash; -#[deriving(Hash)] +#[derive(Hash)] struct Person { id: uint, name: String, diff --git a/src/test/run-pass/deriving-in-fn.rs b/src/test/run-pass/deriving-in-fn.rs index baa036ee039e0..d191bad10ea66 100644 --- a/src/test/run-pass/deriving-in-fn.rs +++ b/src/test/run-pass/deriving-in-fn.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - #[deriving(Show)] + #[derive(Show)] struct Foo { foo: int, } diff --git a/src/test/run-pass/deriving-in-macro.rs b/src/test/run-pass/deriving-in-macro.rs index 52b5c040d86cd..97f6ee341a71f 100644 --- a/src/test/run-pass/deriving-in-macro.rs +++ b/src/test/run-pass/deriving-in-macro.rs @@ -13,7 +13,7 @@ macro_rules! define_vec ( () => ( mod foo { - #[deriving(PartialEq)] + #[derive(PartialEq)] pub struct bar; } ) diff --git a/src/test/run-pass/deriving-meta-empty-trait-list.rs b/src/test/run-pass/deriving-meta-empty-trait-list.rs index e851ff566d52b..5b55ef6333534 100644 --- a/src/test/run-pass/deriving-meta-empty-trait-list.rs +++ b/src/test/run-pass/deriving-meta-empty-trait-list.rs @@ -11,10 +11,10 @@ // except according to those terms. -#[deriving] //~ WARNING empty trait list in `deriving` +#[derive] //~ WARNING empty trait list in `derive` struct Foo; -#[deriving()] //~ WARNING empty trait list in `deriving` +#[derive()] //~ WARNING empty trait list in `derive` struct Bar; pub fn main() {} diff --git a/src/test/run-pass/deriving-meta-multiple.rs b/src/test/run-pass/deriving-meta-multiple.rs index 1f2cd0425d322..c435a1f344d3d 100644 --- a/src/test/run-pass/deriving-meta-multiple.rs +++ b/src/test/run-pass/deriving-meta-multiple.rs @@ -12,9 +12,9 @@ use std::hash::hash; // testing multiple separate deriving attributes -#[deriving(PartialEq)] -#[deriving(Clone)] -#[deriving(Hash)] +#[derive(PartialEq)] +#[derive(Clone)] +#[derive(Hash)] struct Foo { bar: uint, baz: int diff --git a/src/test/run-pass/deriving-meta.rs b/src/test/run-pass/deriving-meta.rs index 61df7bf508860..54dc2b97b77f3 100644 --- a/src/test/run-pass/deriving-meta.rs +++ b/src/test/run-pass/deriving-meta.rs @@ -11,7 +11,7 @@ use std::hash::hash; -#[deriving(PartialEq, Clone, Hash)] +#[derive(PartialEq, Clone, Hash)] struct Foo { bar: uint, baz: int diff --git a/src/test/run-pass/deriving-primitive.rs b/src/test/run-pass/deriving-primitive.rs index 438baef62e50c..7ea9f6f19a08a 100644 --- a/src/test/run-pass/deriving-primitive.rs +++ b/src/test/run-pass/deriving-primitive.rs @@ -11,7 +11,7 @@ use std::num::FromPrimitive; use std::int; -#[deriving(PartialEq, FromPrimitive, Show)] +#[derive(PartialEq, FromPrimitive, Show)] enum A { Foo = int::MAX, Bar = 1, diff --git a/src/test/run-pass/deriving-rand.rs b/src/test/run-pass/deriving-rand.rs index 544c0052433dc..f1396efedfe12 100644 --- a/src/test/run-pass/deriving-rand.rs +++ b/src/test/run-pass/deriving-rand.rs @@ -10,19 +10,19 @@ use std::rand; -#[deriving(Rand)] +#[derive(Rand)] struct A; -#[deriving(Rand)] +#[derive(Rand)] struct B(int, int); -#[deriving(Rand)] +#[derive(Rand)] struct C { x: f64, y: (u8, u8) } -#[deriving(Rand)] +#[derive(Rand)] enum D { D0, D1(uint), diff --git a/src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs b/src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs index d63c264479a93..3277435e485b1 100644 --- a/src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs +++ b/src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs @@ -12,7 +12,7 @@ use std::cmp::Ordering::{Less,Equal,Greater}; -#[deriving(Eq,Ord)] +#[derive(Eq,Ord)] struct A<'a> { x: &'a int } diff --git a/src/test/run-pass/deriving-self-lifetime.rs b/src/test/run-pass/deriving-self-lifetime.rs index 528c4f70baf6b..44609b6d653ca 100644 --- a/src/test/run-pass/deriving-self-lifetime.rs +++ b/src/test/run-pass/deriving-self-lifetime.rs @@ -10,7 +10,7 @@ // ignore-test FIXME #11820: & is unreliable in deriving -#[deriving(Eq,Ord)] +#[derive(Eq,Ord)] struct A<'a> { x: &'a int } diff --git a/src/test/run-pass/deriving-show-2.rs b/src/test/run-pass/deriving-show-2.rs index df4bc1ae1d09c..58faab7bfbe52 100644 --- a/src/test/run-pass/deriving-show-2.rs +++ b/src/test/run-pass/deriving-show-2.rs @@ -10,25 +10,25 @@ use std::fmt; -#[deriving(Show)] +#[derive(Show)] enum A {} -#[deriving(Show)] +#[derive(Show)] enum B { B1, B2, B3 } -#[deriving(Show)] +#[derive(Show)] enum C { C1(int), C2(B), C3(String) } -#[deriving(Show)] +#[derive(Show)] enum D { D1{ a: int } } -#[deriving(Show)] +#[derive(Show)] struct E; -#[deriving(Show)] +#[derive(Show)] struct F(int); -#[deriving(Show)] +#[derive(Show)] struct G(int, int); -#[deriving(Show)] +#[derive(Show)] struct H { a: int } -#[deriving(Show)] +#[derive(Show)] struct I { a: int, b: int } -#[deriving(Show)] +#[derive(Show)] struct J(Custom); struct Custom; diff --git a/src/test/run-pass/deriving-show.rs b/src/test/run-pass/deriving-show.rs index ccfaac8378fa8..f619c824d5e68 100644 --- a/src/test/run-pass/deriving-show.rs +++ b/src/test/run-pass/deriving-show.rs @@ -10,16 +10,16 @@ #![feature(macro_rules)] -#[deriving(Show)] +#[derive(Show)] struct Unit; -#[deriving(Show)] +#[derive(Show)] struct Tuple(int, uint); -#[deriving(Show)] +#[derive(Show)] struct Struct { x: int, y: uint } -#[deriving(Show)] +#[derive(Show)] enum Enum { Nullary, Variant(int, uint), 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 ebbf7972f9cac..d6594290b23e9 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(PartialEq, Show)] +#[derive(PartialEq, Show)] 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 51aba88157a98..5d009655fce01 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(PartialEq, Show)] +#[derive(PartialEq, Show)] enum Foo { Bar(int, int), Baz(f64, f64) diff --git a/src/test/run-pass/deriving-via-extension-hash-enum.rs b/src/test/run-pass/deriving-via-extension-hash-enum.rs index 778767cfcc1e9..10bd1b29444d2 100644 --- a/src/test/run-pass/deriving-via-extension-hash-enum.rs +++ b/src/test/run-pass/deriving-via-extension-hash-enum.rs @@ -9,13 +9,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Hash)] +#[derive(Hash)] enum Foo { Bar(int, char), Baz(char, int) } -#[deriving(Hash)] +#[derive(Hash)] enum A { B, C, diff --git a/src/test/run-pass/deriving-via-extension-hash-struct.rs b/src/test/run-pass/deriving-via-extension-hash-struct.rs index a281c5156b6ed..19809def9a10d 100644 --- a/src/test/run-pass/deriving-via-extension-hash-struct.rs +++ b/src/test/run-pass/deriving-via-extension-hash-struct.rs @@ -9,7 +9,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Hash)] +#[derive(Hash)] 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 ab1a67f7e1234..d3c1c468f7cfb 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(PartialEq, Show)] +#[derive(PartialEq, Show)] 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 b091787b1ee23..5e60818731b2a 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 @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] 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 8a6aa0fad9342..a8a06244b2080 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(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Foo(int, int, String); 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 18d207d75d471..86a0ec15c8383 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(PartialEq, Show)] +#[derive(PartialEq, Show)] 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 a3151e0a8fa6f..266c51d1b6672 100644 --- a/src/test/run-pass/deriving-via-extension-type-params.rs +++ b/src/test/run-pass/deriving-via-extension-type-params.rs @@ -9,7 +9,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq, Hash, Show)] +#[derive(PartialEq, Hash, Show)] struct Foo { x: int, y: T, diff --git a/src/test/run-pass/deriving-zero.rs b/src/test/run-pass/deriving-zero.rs index 88f3e5775b78b..71f0acea0bf8c 100644 --- a/src/test/run-pass/deriving-zero.rs +++ b/src/test/run-pass/deriving-zero.rs @@ -11,7 +11,7 @@ use std::num::Zero; -#[deriving(Zero)] +#[derive(Zero)] struct Vector2(T, T); impl> Add, Vector2> for Vector2 { @@ -24,7 +24,7 @@ impl> Add, Vector2> for Vector2 { } } -#[deriving(Zero)] +#[derive(Zero)] struct Vector3 { x: T, y: T, z: T, } @@ -39,7 +39,7 @@ impl> Add, Vector3> for Vector3 { } } -#[deriving(Zero)] +#[derive(Zero)] struct Matrix3x2 { x: Vector2, y: Vector2, diff --git a/src/test/run-pass/drop-trait-enum.rs b/src/test/run-pass/drop-trait-enum.rs index 24915d84e7eb1..16ad2b8e21a00 100644 --- a/src/test/run-pass/drop-trait-enum.rs +++ b/src/test/run-pass/drop-trait-enum.rs @@ -10,7 +10,7 @@ use std::task; -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] enum Message { Dropped, DestructorRan diff --git a/src/test/run-pass/dst-struct-sole.rs b/src/test/run-pass/dst-struct-sole.rs index 47547bb7e5a27..c7f37da157f4c 100644 --- a/src/test/run-pass/dst-struct-sole.rs +++ b/src/test/run-pass/dst-struct-sole.rs @@ -30,7 +30,7 @@ fn foo2(x: &Fat<[T]>) { assert!(x.ptr[1].to_bar() == bar); } -#[deriving(PartialEq,Eq)] +#[derive(PartialEq,Eq)] struct Bar; impl Copy for Bar {} diff --git a/src/test/run-pass/dst-struct.rs b/src/test/run-pass/dst-struct.rs index fb536904ac80f..9c0e5a6f5c899 100644 --- a/src/test/run-pass/dst-struct.rs +++ b/src/test/run-pass/dst-struct.rs @@ -46,7 +46,7 @@ fn foo3(x: &Fat>) { } -#[deriving(PartialEq,Eq)] +#[derive(PartialEq,Eq)] struct Bar; impl Copy for Bar {} diff --git a/src/test/run-pass/dst-trait.rs b/src/test/run-pass/dst-trait.rs index abe55d78ac69a..0b50609fddfef 100644 --- a/src/test/run-pass/dst-trait.rs +++ b/src/test/run-pass/dst-trait.rs @@ -14,12 +14,12 @@ struct Fat { ptr: T } -#[deriving(PartialEq,Eq)] +#[derive(PartialEq,Eq)] struct Bar; impl Copy for Bar {} -#[deriving(PartialEq,Eq)] +#[derive(PartialEq,Eq)] struct Bar1 { f: int } diff --git a/src/test/run-pass/empty-tag.rs b/src/test/run-pass/empty-tag.rs index e5d11ac1adb2a..58eb4ce2f7a55 100644 --- a/src/test/run-pass/empty-tag.rs +++ b/src/test/run-pass/empty-tag.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] enum chan { chan_t, } impl Copy for chan {} diff --git a/src/test/run-pass/enum-discrim-width-stuff.rs b/src/test/run-pass/enum-discrim-width-stuff.rs index cf8e742947d1d..73abec89a2df9 100644 --- a/src/test/run-pass/enum-discrim-width-stuff.rs +++ b/src/test/run-pass/enum-discrim-width-stuff.rs @@ -14,7 +14,7 @@ macro_rules! check { ($m:ident, $t:ty, $v:expr) => {{ mod $m { use std::mem::size_of; - #[deriving(Show)] + #[derive(Show)] enum E { V = $v, A = 0 diff --git a/src/test/run-pass/eq-multidispatch.rs b/src/test/run-pass/eq-multidispatch.rs index 018e8cddc71c6..31ed212db999c 100644 --- a/src/test/run-pass/eq-multidispatch.rs +++ b/src/test/run-pass/eq-multidispatch.rs @@ -10,7 +10,7 @@ #![feature(default_type_params)] -#[deriving(PartialEq)] +#[derive(PartialEq)] struct Bar; struct Baz; struct Foo; diff --git a/src/test/run-pass/explicit-self.rs b/src/test/run-pass/explicit-self.rs index b13819717d791..8a67e40844a73 100644 --- a/src/test/run-pass/explicit-self.rs +++ b/src/test/run-pass/explicit-self.rs @@ -40,12 +40,12 @@ fn select_based_on_unit_circle<'r, T>( shape.select(threshold, a, b) } -#[deriving(Clone)] +#[derive(Clone)] struct thing { x: A } -#[deriving(Clone)] +#[derive(Clone)] struct A { a: int } diff --git a/src/test/run-pass/expr-block-generic.rs b/src/test/run-pass/expr-block-generic.rs index 677914fd60e6f..f1363c42961e1 100644 --- a/src/test/run-pass/expr-block-generic.rs +++ b/src/test/run-pass/expr-block-generic.rs @@ -23,7 +23,7 @@ fn test_bool() { test_generic::(true, compare_bool); } -#[deriving(Clone)] +#[derive(Clone)] struct Pair { a: int, b: int, diff --git a/src/test/run-pass/expr-if-generic.rs b/src/test/run-pass/expr-if-generic.rs index b7408440404de..d9300d0bc335a 100644 --- a/src/test/run-pass/expr-if-generic.rs +++ b/src/test/run-pass/expr-if-generic.rs @@ -22,7 +22,7 @@ fn test_bool() { test_generic::(true, false, compare_bool); } -#[deriving(Clone)] +#[derive(Clone)] struct Pair { a: int, b: int, diff --git a/src/test/run-pass/expr-if-struct.rs b/src/test/run-pass/expr-if-struct.rs index c95ca3fff8c56..62994068a9e14 100644 --- a/src/test/run-pass/expr-if-struct.rs +++ b/src/test/run-pass/expr-if-struct.rs @@ -23,7 +23,7 @@ fn test_rec() { assert_eq!(rs.i, 100); } -#[deriving(Show)] +#[derive(Show)] enum mood { happy, sad, } impl Copy for mood {} diff --git a/src/test/run-pass/expr-match-generic.rs b/src/test/run-pass/expr-match-generic.rs index c74caf4de4bdc..8e66827e0198f 100644 --- a/src/test/run-pass/expr-match-generic.rs +++ b/src/test/run-pass/expr-match-generic.rs @@ -21,7 +21,7 @@ fn test_bool() { test_generic::(true, compare_bool); } -#[deriving(Clone)] +#[derive(Clone)] struct Pair { a: int, b: int, diff --git a/src/test/run-pass/expr-match-struct.rs b/src/test/run-pass/expr-match-struct.rs index 83101a3d2cc3a..8512cf63cdddd 100644 --- a/src/test/run-pass/expr-match-struct.rs +++ b/src/test/run-pass/expr-match-struct.rs @@ -22,7 +22,7 @@ fn test_rec() { assert_eq!(rs.i, 100); } -#[deriving(Show)] +#[derive(Show)] enum mood { happy, sad, } impl Copy for mood {} diff --git a/src/test/run-pass/extern-pass-TwoU16s.rs b/src/test/run-pass/extern-pass-TwoU16s.rs index 2b80a40403626..a38fe6d6d5059 100644 --- a/src/test/run-pass/extern-pass-TwoU16s.rs +++ b/src/test/run-pass/extern-pass-TwoU16s.rs @@ -11,7 +11,7 @@ // Test a foreign function that accepts and returns a struct // by value. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] pub struct TwoU16s { one: u16, two: u16 } diff --git a/src/test/run-pass/extern-pass-TwoU32s.rs b/src/test/run-pass/extern-pass-TwoU32s.rs index be4998c86fddf..30b035d56b659 100644 --- a/src/test/run-pass/extern-pass-TwoU32s.rs +++ b/src/test/run-pass/extern-pass-TwoU32s.rs @@ -11,7 +11,7 @@ // Test a foreign function that accepts and returns a struct // by value. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] pub struct TwoU32s { one: u32, two: u32 } diff --git a/src/test/run-pass/extern-pass-TwoU64s.rs b/src/test/run-pass/extern-pass-TwoU64s.rs index e8d91815bf9d7..8ca05f09a9c9a 100644 --- a/src/test/run-pass/extern-pass-TwoU64s.rs +++ b/src/test/run-pass/extern-pass-TwoU64s.rs @@ -11,7 +11,7 @@ // Test a foreign function that accepts and returns a struct // by value. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] pub struct TwoU64s { one: u64, two: u64 } diff --git a/src/test/run-pass/extern-pass-TwoU8s.rs b/src/test/run-pass/extern-pass-TwoU8s.rs index 7aa710df80058..42a1ce788707e 100644 --- a/src/test/run-pass/extern-pass-TwoU8s.rs +++ b/src/test/run-pass/extern-pass-TwoU8s.rs @@ -11,7 +11,7 @@ // Test a foreign function that accepts and returns a struct // by value. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] pub struct TwoU8s { one: u8, two: u8 } diff --git a/src/test/run-pass/functional-struct-upd.rs b/src/test/run-pass/functional-struct-upd.rs index a8d0c7d44fd2b..e2297661d65c1 100644 --- a/src/test/run-pass/functional-struct-upd.rs +++ b/src/test/run-pass/functional-struct-upd.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct Foo { x: int, y: int diff --git a/src/test/run-pass/generic-default-type-params.rs b/src/test/run-pass/generic-default-type-params.rs index b7706088b6202..e88801f14ed48 100644 --- a/src/test/run-pass/generic-default-type-params.rs +++ b/src/test/run-pass/generic-default-type-params.rs @@ -49,10 +49,10 @@ fn default_foo(x: Foo) { assert_eq!(x.baz(), (1, 'a')); } -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct BazHelper(T); -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] // Ensure that we can use previous type parameters in defaults. struct Baz, V = Option>(T, U, V); diff --git a/src/test/run-pass/generic-derived-type.rs b/src/test/run-pass/generic-derived-type.rs index 177455515dd71..0db03b4674879 100644 --- a/src/test/run-pass/generic-derived-type.rs +++ b/src/test/run-pass/generic-derived-type.rs @@ -10,7 +10,7 @@ fn g(x: X) -> X { return x; } -#[deriving(Clone)] +#[derive(Clone)] struct Pair { a: T, b: T diff --git a/src/test/run-pass/hrtb-opt-in-copy.rs b/src/test/run-pass/hrtb-opt-in-copy.rs index b6bba363e7236..0616a7b21b546 100644 --- a/src/test/run-pass/hrtb-opt-in-copy.rs +++ b/src/test/run-pass/hrtb-opt-in-copy.rs @@ -20,7 +20,7 @@ use std::kinds::marker; -#[deriving(Copy)] +#[derive(Copy)] struct Foo { x: T } type Ty<'tcx> = &'tcx TyS<'tcx>; diff --git a/src/test/run-pass/issue-10396.rs b/src/test/run-pass/issue-10396.rs index ce04f188e341f..ea311e6e32c65 100644 --- a/src/test/run-pass/issue-10396.rs +++ b/src/test/run-pass/issue-10396.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] enum Foo<'s> { V(&'s str) } diff --git a/src/test/run-pass/issue-11552.rs b/src/test/run-pass/issue-11552.rs index f7223ae5d2d40..92862961acaba 100644 --- a/src/test/run-pass/issue-11552.rs +++ b/src/test/run-pass/issue-11552.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] enum Noun { Atom(int), diff --git a/src/test/run-pass/issue-11881.rs b/src/test/run-pass/issue-11881.rs index 8de847bfa3314..9008e8468f46f 100644 --- a/src/test/run-pass/issue-11881.rs +++ b/src/test/run-pass/issue-11881.rs @@ -21,12 +21,12 @@ use serialize::json; use rbml::writer; use rbml::io::SeekableMemWriter; -#[deriving(Encodable)] +#[derive(Encodable)] struct Foo { baz: bool, } -#[deriving(Encodable)] +#[derive(Encodable)] struct Bar { froboz: uint, } diff --git a/src/test/run-pass/issue-12860.rs b/src/test/run-pass/issue-12860.rs index 1caa04ae0b16d..8a95723c7358f 100644 --- a/src/test/run-pass/issue-12860.rs +++ b/src/test/run-pass/issue-12860.rs @@ -13,7 +13,7 @@ extern crate collections; use std::collections::HashSet; -#[deriving(PartialEq, Eq, Hash)] +#[derive(PartialEq, Eq, Hash)] struct XYZ { x: int, y: int, diff --git a/src/test/run-pass/issue-13264.rs b/src/test/run-pass/issue-13264.rs index 06ab67f2f3e97..c416d30f776bc 100644 --- a/src/test/run-pass/issue-13264.rs +++ b/src/test/run-pass/issue-13264.rs @@ -18,7 +18,7 @@ impl Deref for Root { } } -#[deriving(Copy)] +#[derive(Copy)] struct JSRef { node: *const Node } diff --git a/src/test/run-pass/issue-13434.rs b/src/test/run-pass/issue-13434.rs index ac7a55ee40588..e223feede02e6 100644 --- a/src/test/run-pass/issue-13434.rs +++ b/src/test/run-pass/issue-13434.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct MyStruct; trait Repro { diff --git a/src/test/run-pass/issue-14021.rs b/src/test/run-pass/issue-14021.rs index a55cded87e51d..612ed6b70b448 100644 --- a/src/test/run-pass/issue-14021.rs +++ b/src/test/run-pass/issue-14021.rs @@ -14,7 +14,7 @@ extern crate serialize; use serialize::{Encodable, Decodable}; use serialize::json; -#[deriving(Encodable, Decodable, PartialEq, Show)] +#[derive(Encodable, Decodable, PartialEq, Show)] struct UnitLikeStruct; pub fn main() { diff --git a/src/test/run-pass/issue-14399.rs b/src/test/run-pass/issue-14399.rs index 4c84d0fcaf089..bb0fe6a87ab07 100644 --- a/src/test/run-pass/issue-14399.rs +++ b/src/test/run-pass/issue-14399.rs @@ -13,7 +13,7 @@ // value was coerced to a trait object. (v.clone() returns Box // which is coerced to Box). -#[deriving(Clone)] +#[derive(Clone)] struct B1; trait A {} diff --git a/src/test/run-pass/issue-15689-1.rs b/src/test/run-pass/issue-15689-1.rs index 6cb1d4a14f554..06e9e652ed25b 100644 --- a/src/test/run-pass/issue-15689-1.rs +++ b/src/test/run-pass/issue-15689-1.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq)] +#[derive(PartialEq)] enum Test<'a> { Slice(&'a int) } diff --git a/src/test/run-pass/issue-15689-2.rs b/src/test/run-pass/issue-15689-2.rs index 026122d1259f6..8da82c498b0b7 100644 --- a/src/test/run-pass/issue-15689-2.rs +++ b/src/test/run-pass/issue-15689-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] enum Test<'a> { Slice(&'a int) } diff --git a/src/test/run-pass/issue-15763.rs b/src/test/run-pass/issue-15763.rs index 0c09e456930c2..48fdcb09080ae 100644 --- a/src/test/run-pass/issue-15763.rs +++ b/src/test/run-pass/issue-15763.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Bar { x: int } @@ -19,7 +19,7 @@ impl Drop for Bar { } } -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Foo { x: Bar, a: int diff --git a/src/test/run-pass/issue-18738.rs b/src/test/run-pass/issue-18738.rs index 35bd68d803a2e..30ad827c69723 100644 --- a/src/test/run-pass/issue-18738.rs +++ b/src/test/run-pass/issue-18738.rs @@ -8,18 +8,18 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Eq, PartialEq, PartialOrd, Ord)] +#[derive(Eq, PartialEq, PartialOrd, Ord)] enum Test<'a> { Int(&'a int), Slice(&'a [u8]), } -#[deriving(Eq, PartialEq, PartialOrd, Ord)] +#[derive(Eq, PartialEq, PartialOrd, Ord)] struct Version { vendor_info: &'static str } -#[deriving(Eq, PartialEq, PartialOrd, Ord)] +#[derive(Eq, PartialEq, PartialOrd, Ord)] struct Foo(&'static str); fn main() {} diff --git a/src/test/run-pass/issue-19037.rs b/src/test/run-pass/issue-19037.rs index a6b5f4b874466..ac181c8db7185 100644 --- a/src/test/run-pass/issue-19037.rs +++ b/src/test/run-pass/issue-19037.rs @@ -10,7 +10,7 @@ struct Str([u8]); -#[deriving(Clone)] +#[derive(Clone)] struct CharSplits<'a, Sep> { string: &'a Str, sep: Sep, diff --git a/src/test/run-pass/issue-19135.rs b/src/test/run-pass/issue-19135.rs index 604442d150689..b9d0a9a2988f4 100644 --- a/src/test/run-pass/issue-19135.rs +++ b/src/test/run-pass/issue-19135.rs @@ -10,7 +10,7 @@ #![feature(unboxed_closures)] -#[deriving(Show)] +#[derive(Show)] struct LifetimeStruct<'a>; fn main() { diff --git a/src/test/run-pass/issue-19358.rs b/src/test/run-pass/issue-19358.rs index e4c190f41169e..86687fccd61fc 100644 --- a/src/test/run-pass/issue-19358.rs +++ b/src/test/run-pass/issue-19358.rs @@ -10,12 +10,12 @@ trait Trait {} -#[deriving(Show)] +#[derive(Show)] struct Foo { foo: T, } -#[deriving(Show)] +#[derive(Show)] struct Bar where T: Trait { bar: T, } diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index d949cab97c229..2a4ca5b421056 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -31,7 +31,7 @@ pub mod pipes { payload: Option } - #[deriving(PartialEq, Show)] + #[derive(PartialEq, Show)] #[repr(int)] pub enum state { empty, diff --git a/src/test/run-pass/issue-2804.rs b/src/test/run-pass/issue-2804.rs index 6f1f2cea8ec3c..ab2d1d9009348 100644 --- a/src/test/run-pass/issue-2804.rs +++ b/src/test/run-pass/issue-2804.rs @@ -13,7 +13,7 @@ extern crate collections; extern crate serialize; use std::collections::HashMap; -use serialize::json::{mod, Json}; +use serialize::json::{self, Json}; use std::option; enum object { diff --git a/src/test/run-pass/issue-3556.rs b/src/test/run-pass/issue-3556.rs index 028081888c346..e004c24da1368 100644 --- a/src/test/run-pass/issue-3556.rs +++ b/src/test/run-pass/issue-3556.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving(Show)] +#[derive(Show)] enum Token { Text(String), ETag(Vec, String), diff --git a/src/test/run-pass/issue-3794.rs b/src/test/run-pass/issue-3794.rs index f32564e8b7503..4508bc5771cbd 100644 --- a/src/test/run-pass/issue-3794.rs +++ b/src/test/run-pass/issue-3794.rs @@ -12,7 +12,7 @@ trait T { fn print(&self); } -#[deriving(Show)] +#[derive(Show)] struct S { s: int, } diff --git a/src/test/run-pass/issue-3935.rs b/src/test/run-pass/issue-3935.rs index e616c784f4d38..f534f744a2030 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(PartialEq)] +#[derive(PartialEq)] struct Bike { name: String, } diff --git a/src/test/run-pass/issue-4252.rs b/src/test/run-pass/issue-4252.rs index 04b1cbf577db9..6ed35e6bc232f 100644 --- a/src/test/run-pass/issue-4252.rs +++ b/src/test/run-pass/issue-4252.rs @@ -17,10 +17,10 @@ trait X { } } -#[deriving(Show)] +#[derive(Show)] struct Y(int); -#[deriving(Show)] +#[derive(Show)] struct Z { x: T } diff --git a/src/test/run-pass/issue-5008-borrowed-traitobject-method-call.rs b/src/test/run-pass/issue-5008-borrowed-traitobject-method-call.rs index 5e7e7503f640a..90900ca46ce01 100644 --- a/src/test/run-pass/issue-5008-borrowed-traitobject-method-call.rs +++ b/src/test/run-pass/issue-5008-borrowed-traitobject-method-call.rs @@ -19,7 +19,7 @@ trait Debuggable { fn debug_name(&self) -> String; } -#[deriving(Clone)] +#[derive(Clone)] struct Thing { name: String, } diff --git a/src/test/run-pass/issue-6341.rs b/src/test/run-pass/issue-6341.rs index e82448a44200c..6e49c0435665d 100644 --- a/src/test/run-pass/issue-6341.rs +++ b/src/test/run-pass/issue-6341.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq)] +#[derive(PartialEq)] struct A { x: uint } impl Drop for A { diff --git a/src/test/run-pass/issue-7563.rs b/src/test/run-pass/issue-7563.rs index 73697b2bdb889..4d217fbf3351e 100644 --- a/src/test/run-pass/issue-7563.rs +++ b/src/test/run-pass/issue-7563.rs @@ -12,9 +12,9 @@ trait IDummy { fn do_nothing(&self); } -#[deriving(Show)] +#[derive(Show)] struct A { a: int } -#[deriving(Show)] +#[derive(Show)] struct B<'a> { b: int, pa: &'a A } impl IDummy for A { diff --git a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs index 165561e5256ec..bffa86a2c62e8 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Clone, Show)] +#[derive(Clone, Show)] enum foo { a(uint), b(String), diff --git a/src/test/run-pass/log-knows-the-names-of-variants.rs b/src/test/run-pass/log-knows-the-names-of-variants.rs index 5acf54c30f139..e40723ab1b631 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants.rs @@ -8,14 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] enum foo { a(uint), b(String), c, } -#[deriving(Show)] +#[derive(Show)] enum bar { d, e, f } diff --git a/src/test/run-pass/log-poly.rs b/src/test/run-pass/log-poly.rs index 48cd49158dfb8..163efcb1a2ba6 100644 --- a/src/test/run-pass/log-poly.rs +++ b/src/test/run-pass/log-poly.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] enum Numbers { Three } diff --git a/src/test/run-pass/monomorphize-abi-alignment.rs b/src/test/run-pass/monomorphize-abi-alignment.rs index f5b51cd423301..84bffed59a49c 100644 --- a/src/test/run-pass/monomorphize-abi-alignment.rs +++ b/src/test/run-pass/monomorphize-abi-alignment.rs @@ -28,12 +28,12 @@ impl S { } } -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct A((u32, u32)); impl Copy for A {} -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct B(u64); impl Copy for B {} diff --git a/src/test/run-pass/move-1-unique.rs b/src/test/run-pass/move-1-unique.rs index 19153dd3742e2..2da6076d13863 100644 --- a/src/test/run-pass/move-1-unique.rs +++ b/src/test/run-pass/move-1-unique.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] struct Triple { x: int, y: int, diff --git a/src/test/run-pass/move-3-unique.rs b/src/test/run-pass/move-3-unique.rs index 1977842536749..2820e0d712056 100644 --- a/src/test/run-pass/move-3-unique.rs +++ b/src/test/run-pass/move-3-unique.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] struct Triple { x: int, y: int, diff --git a/src/test/run-pass/newtype-polymorphic.rs b/src/test/run-pass/newtype-polymorphic.rs index a21bb489d16c5..74487f5b57d6b 100644 --- a/src/test/run-pass/newtype-polymorphic.rs +++ b/src/test/run-pass/newtype-polymorphic.rs @@ -9,7 +9,7 @@ // except according to those terms. -#[deriving(Clone)] +#[derive(Clone)] struct myvec(Vec ); fn myvec_deref(mv: myvec) -> Vec { diff --git a/src/test/run-pass/newtype-temporary.rs b/src/test/run-pass/newtype-temporary.rs index b38bc9b6946a3..d2523eac31e04 100644 --- a/src/test/run-pass/newtype-temporary.rs +++ b/src/test/run-pass/newtype-temporary.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Foo(uint); fn foo() -> Foo { diff --git a/src/test/run-pass/operator-multidispatch.rs b/src/test/run-pass/operator-multidispatch.rs index cb3397c00bc57..2394822d9baea 100644 --- a/src/test/run-pass/operator-multidispatch.rs +++ b/src/test/run-pass/operator-multidispatch.rs @@ -13,7 +13,7 @@ use std::ops; -#[deriving(Show,PartialEq,Eq)] +#[derive(Show,PartialEq,Eq)] struct Point { x: int, y: int diff --git a/src/test/run-pass/operator-overloading.rs b/src/test/run-pass/operator-overloading.rs index 1e646e9399c56..101b93c1896f1 100644 --- a/src/test/run-pass/operator-overloading.rs +++ b/src/test/run-pass/operator-overloading.rs @@ -12,7 +12,7 @@ use std::cmp; use std::ops; -#[deriving(Copy, Show)] +#[derive(Copy, Show)] struct Point { x: int, y: int diff --git a/src/test/run-pass/overloaded-autoderef-count.rs b/src/test/run-pass/overloaded-autoderef-count.rs index 4cf5e07413935..baf1b1b023740 100644 --- a/src/test/run-pass/overloaded-autoderef-count.rs +++ b/src/test/run-pass/overloaded-autoderef-count.rs @@ -11,7 +11,7 @@ use std::cell::Cell; use std::ops::{Deref, DerefMut}; -#[deriving(PartialEq)] +#[derive(PartialEq)] struct DerefCounter { count_imm: Cell, count_mut: uint, @@ -46,7 +46,7 @@ impl DerefMut for DerefCounter { } } -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Point { x: int, y: int diff --git a/src/test/run-pass/overloaded-autoderef.rs b/src/test/run-pass/overloaded-autoderef.rs index 2975b209d0690..344b27ef35f0b 100644 --- a/src/test/run-pass/overloaded-autoderef.rs +++ b/src/test/run-pass/overloaded-autoderef.rs @@ -12,7 +12,7 @@ use std::cell::RefCell; use std::rc::Rc; use std::string::String; -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Point { x: int, y: int diff --git a/src/test/run-pass/overloaded-deref.rs b/src/test/run-pass/overloaded-deref.rs index ca820830f023f..1251394a549d6 100644 --- a/src/test/run-pass/overloaded-deref.rs +++ b/src/test/run-pass/overloaded-deref.rs @@ -12,7 +12,7 @@ use std::cell::RefCell; use std::rc::Rc; use std::string::String; -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Point { x: int, y: int diff --git a/src/test/run-pass/overloaded-index-assoc-list.rs b/src/test/run-pass/overloaded-index-assoc-list.rs index c0359a3418698..0347f8a29df28 100644 --- a/src/test/run-pass/overloaded-index-assoc-list.rs +++ b/src/test/run-pass/overloaded-index-assoc-list.rs @@ -16,7 +16,7 @@ use std::ops::Index; struct AssociationList { pairs: Vec> } -#[deriving(Clone)] +#[derive(Clone)] struct AssociationPair { key: K, value: V diff --git a/src/test/run-pass/packed-struct-vec.rs b/src/test/run-pass/packed-struct-vec.rs index d2121aa775216..8e5decf5e62e1 100644 --- a/src/test/run-pass/packed-struct-vec.rs +++ b/src/test/run-pass/packed-struct-vec.rs @@ -13,7 +13,7 @@ use std::mem; #[repr(packed)] -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Foo { bar: u8, baz: u64 diff --git a/src/test/run-pass/rec-align-u32.rs b/src/test/run-pass/rec-align-u32.rs index ce8c5df074012..b7e362a57aaeb 100644 --- a/src/test/run-pass/rec-align-u32.rs +++ b/src/test/run-pass/rec-align-u32.rs @@ -22,14 +22,14 @@ mod rusti { } // This is the type with the questionable alignment -#[deriving(Show)] +#[derive(Show)] struct Inner { c64: u32 } // This is the type that contains the type with the // questionable alignment, for testing -#[deriving(Show)] +#[derive(Show)] struct Outer { c8: u8, t: Inner diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs index c0c7f4c99be73..26ec5976f9b48 100644 --- a/src/test/run-pass/rec-align-u64.rs +++ b/src/test/run-pass/rec-align-u64.rs @@ -22,14 +22,14 @@ mod rusti { } // This is the type with the questionable alignment -#[deriving(Show)] +#[derive(Show)] struct Inner { c64: u64 } // This is the type that contains the type with the // questionable alignment, for testing -#[deriving(Show)] +#[derive(Show)] struct Outer { c8: u8, t: Inner diff --git a/src/test/run-pass/regions-mock-tcx.rs b/src/test/run-pass/regions-mock-tcx.rs index e10c12a603729..6e85011b14316 100644 --- a/src/test/run-pass/regions-mock-tcx.rs +++ b/src/test/run-pass/regions-mock-tcx.rs @@ -27,7 +27,7 @@ use std::mem; type Type<'tcx> = &'tcx TypeStructure<'tcx>; -#[deriving(Show)] +#[derive(Show)] enum TypeStructure<'tcx> { TypeInt, TypeFunction(Type<'tcx>, Type<'tcx>), @@ -91,7 +91,7 @@ impl<'tcx,'ast> TypeContext<'tcx, 'ast> { } } -#[deriving(PartialEq, Eq, Hash)] +#[derive(PartialEq, Eq, Hash)] struct NodeId { id: uint } diff --git a/src/test/run-pass/resource-assign-is-not-copy.rs b/src/test/run-pass/resource-assign-is-not-copy.rs index 5ea22ae76c2c0..a67b24f8b1e3f 100644 --- a/src/test/run-pass/resource-assign-is-not-copy.rs +++ b/src/test/run-pass/resource-assign-is-not-copy.rs @@ -12,7 +12,7 @@ use std::cell::Cell; -#[deriving(Show)] +#[derive(Show)] struct r<'a> { i: &'a Cell, } diff --git a/src/test/run-pass/show-boxed-slice.rs b/src/test/run-pass/show-boxed-slice.rs index 3d2672653323f..2273c399c9a52 100644 --- a/src/test/run-pass/show-boxed-slice.rs +++ b/src/test/run-pass/show-boxed-slice.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct Foo(Box<[u8]>); pub fn main() { diff --git a/src/test/run-pass/small-enums-with-fields.rs b/src/test/run-pass/small-enums-with-fields.rs index cbc3bbadf222c..247fa6453b831 100644 --- a/src/test/run-pass/small-enums-with-fields.rs +++ b/src/test/run-pass/small-enums-with-fields.rs @@ -12,7 +12,7 @@ use std::mem::size_of; -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] enum Either { Left(T), Right(U) } macro_rules! check { diff --git a/src/test/run-pass/struct-lit-functional-no-fields.rs b/src/test/run-pass/struct-lit-functional-no-fields.rs index b8d6aa40ae9c8..da40f10e9fa9a 100644 --- a/src/test/run-pass/struct-lit-functional-no-fields.rs +++ b/src/test/run-pass/struct-lit-functional-no-fields.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show,PartialEq,Clone)] +#[derive(Show,PartialEq,Clone)] struct Foo { bar: T, baz: T diff --git a/src/test/run-pass/struct-partial-move-1.rs b/src/test/run-pass/struct-partial-move-1.rs index d64408ec42f70..8cc4cd142be09 100644 --- a/src/test/run-pass/struct-partial-move-1.rs +++ b/src/test/run-pass/struct-partial-move-1.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] pub struct Partial { x: T, y: T } -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct S { val: int } impl S { fn new(v: int) -> S { S { val: v } } } impl Drop for S { fn drop(&mut self) { } } diff --git a/src/test/run-pass/struct-partial-move-2.rs b/src/test/run-pass/struct-partial-move-2.rs index 0e77079ed057e..aafe9e632b1ed 100644 --- a/src/test/run-pass/struct-partial-move-2.rs +++ b/src/test/run-pass/struct-partial-move-2.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] pub struct Partial { x: T, y: T } -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct S { val: int } impl S { fn new(v: int) -> S { S { val: v } } } impl Drop for S { fn drop(&mut self) { } } diff --git a/src/test/run-pass/structured-compare.rs b/src/test/run-pass/structured-compare.rs index d0446d83d2e01..4f6ed55f4259c 100644 --- a/src/test/run-pass/structured-compare.rs +++ b/src/test/run-pass/structured-compare.rs @@ -10,7 +10,7 @@ -#[deriving(Show)] +#[derive(Show)] enum foo { large, small, } impl Copy for foo {} diff --git a/src/test/run-pass/tag-align-shape.rs b/src/test/run-pass/tag-align-shape.rs index ad96f9d968087..8438a5ff47f9a 100644 --- a/src/test/run-pass/tag-align-shape.rs +++ b/src/test/run-pass/tag-align-shape.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] enum a_tag { a_tag_var(u64) } -#[deriving(Show)] +#[derive(Show)] struct t_rec { c8: u8, t: a_tag diff --git a/src/test/run-pass/tag-disr-val-shape.rs b/src/test/run-pass/tag-disr-val-shape.rs index 491d83414a1dd..1155a619a6070 100644 --- a/src/test/run-pass/tag-disr-val-shape.rs +++ b/src/test/run-pass/tag-disr-val-shape.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] enum color { red = 0xff0000, green = 0x00ff00, diff --git a/src/test/run-pass/task-comm-16.rs b/src/test/run-pass/task-comm-16.rs index 9143385254095..ec41019846bec 100644 --- a/src/test/run-pass/task-comm-16.rs +++ b/src/test/run-pass/task-comm-16.rs @@ -45,7 +45,7 @@ fn test_str() { assert_eq!(s1.as_bytes()[3], 't' as u8); } -#[deriving(Show)] +#[derive(Show)] enum t { tag1, tag2(int), diff --git a/src/test/run-pass/trait-inheritance-overloading-simple.rs b/src/test/run-pass/trait-inheritance-overloading-simple.rs index bd9bc9e9b8875..3c319a8c51202 100644 --- a/src/test/run-pass/trait-inheritance-overloading-simple.rs +++ b/src/test/run-pass/trait-inheritance-overloading-simple.rs @@ -12,7 +12,7 @@ use std::cmp::PartialEq; trait MyNum : PartialEq { } -#[deriving(Show)] +#[derive(Show)] struct MyInt { val: int } impl PartialEq for MyInt { diff --git a/src/test/run-pass/trait-inheritance-overloading.rs b/src/test/run-pass/trait-inheritance-overloading.rs index 5f8e945cce860..739c3e4bdb0d1 100644 --- a/src/test/run-pass/trait-inheritance-overloading.rs +++ b/src/test/run-pass/trait-inheritance-overloading.rs @@ -12,7 +12,7 @@ use std::cmp::PartialEq; trait MyNum : Add + Sub + Mul + PartialEq + Clone { } -#[deriving(Clone, Show)] +#[derive(Clone, Show)] struct MyInt { val: int } impl Add for MyInt { diff --git a/src/test/run-pass/tuple-struct-construct.rs b/src/test/run-pass/tuple-struct-construct.rs index af8b203d9518e..5bf152f2976b9 100644 --- a/src/test/run-pass/tuple-struct-construct.rs +++ b/src/test/run-pass/tuple-struct-construct.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(Show)] +#[derive(Show)] struct Foo(int, int); pub fn main() { diff --git a/src/test/run-pass/tuple-struct-constructor-pointer.rs b/src/test/run-pass/tuple-struct-constructor-pointer.rs index 281ea39084f59..a4bb914b1ab3d 100644 --- a/src/test/run-pass/tuple-struct-constructor-pointer.rs +++ b/src/test/run-pass/tuple-struct-constructor-pointer.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Foo(int); -#[deriving(PartialEq, Show)] +#[derive(PartialEq, Show)] struct Bar(int, int); pub fn main() { diff --git a/src/test/run-pass/typeclasses-eq-example-static.rs b/src/test/run-pass/typeclasses-eq-example-static.rs index 6b00a8b5c2d9f..63a59b6f750ea 100644 --- a/src/test/run-pass/typeclasses-eq-example-static.rs +++ b/src/test/run-pass/typeclasses-eq-example-static.rs @@ -18,7 +18,7 @@ trait Equal { fn isEq(a: &Self, b: &Self) -> bool; } -#[deriving(Clone)] +#[derive(Clone)] enum Color { cyan, magenta, yellow, black } impl Copy for Color {} @@ -35,7 +35,7 @@ impl Equal for Color { } } -#[deriving(Clone)] +#[derive(Clone)] enum ColorTree { leaf(Color), branch(Box, Box) diff --git a/src/test/run-pass/typeclasses-eq-example.rs b/src/test/run-pass/typeclasses-eq-example.rs index e4b7d2eb60bd3..431a9383b3bd3 100644 --- a/src/test/run-pass/typeclasses-eq-example.rs +++ b/src/test/run-pass/typeclasses-eq-example.rs @@ -17,7 +17,7 @@ trait Equal { fn isEq(&self, a: &Self) -> bool; } -#[deriving(Clone)] +#[derive(Clone)] enum Color { cyan, magenta, yellow, black } impl Copy for Color {} @@ -34,7 +34,7 @@ impl Equal for Color { } } -#[deriving(Clone)] +#[derive(Clone)] enum ColorTree { leaf(Color), branch(Box, Box) diff --git a/src/test/run-pass/unboxed-closures-monomorphization.rs b/src/test/run-pass/unboxed-closures-monomorphization.rs index dfc234e87cda1..52855f826731c 100644 --- a/src/test/run-pass/unboxed-closures-monomorphization.rs +++ b/src/test/run-pass/unboxed-closures-monomorphization.rs @@ -28,7 +28,7 @@ fn main(){ let mut f = bar(&x); assert_eq!(f.call_mut(()), &x); - #[deriving(Clone, Show, PartialEq)] + #[derive(Clone, Show, PartialEq)] struct Foo(uint, &'static str); impl Copy for Foo {} diff --git a/src/test/run-pass/uninit-empty-types.rs b/src/test/run-pass/uninit-empty-types.rs index c2bd738b8a46b..a0cf984cbb901 100644 --- a/src/test/run-pass/uninit-empty-types.rs +++ b/src/test/run-pass/uninit-empty-types.rs @@ -12,7 +12,7 @@ use std::mem; -#[deriving(Clone)] +#[derive(Clone)] struct Foo; pub fn main() { diff --git a/src/test/run-pass/use-mod.rs b/src/test/run-pass/use-mod.rs index 34c9f581f0719..3f3cb634d749f 100644 --- a/src/test/run-pass/use-mod.rs +++ b/src/test/run-pass/use-mod.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -pub use foo::bar::{mod, First}; +pub use foo::bar::{self, First}; use self::bar::Second; mod foo { - pub use self::bar::baz::{mod}; + pub use self::bar::baz::{self}; pub mod bar { pub mod baz { diff --git a/src/test/run-pass/vector-sort-panic-safe.rs b/src/test/run-pass/vector-sort-panic-safe.rs index 6ff1cffb4a42f..08bd367917ac1 100644 --- a/src/test/run-pass/vector-sort-panic-safe.rs +++ b/src/test/run-pass/vector-sort-panic-safe.rs @@ -30,7 +30,7 @@ static drop_counts: [AtomicUint; MAX_LEN] = static creation_count: AtomicUint = INIT_ATOMIC_UINT; -#[deriving(Clone, PartialEq, PartialOrd, Eq, Ord)] +#[derive(Clone, PartialEq, PartialOrd, Eq, Ord)] struct DropCounter { x: uint, creation_id: uint } impl Rand for DropCounter { diff --git a/src/test/run-pass/while-prelude-drop.rs b/src/test/run-pass/while-prelude-drop.rs index db9cf0abda3d7..bfabcb4d87b56 100644 --- a/src/test/run-pass/while-prelude-drop.rs +++ b/src/test/run-pass/while-prelude-drop.rs @@ -10,7 +10,7 @@ use std::string::String; -#[deriving(PartialEq)] +#[derive(PartialEq)] enum t { a, b(String), } fn make(i: int) -> t {