diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-03 22:54:18 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-03 22:54:18 -0500 |
| commit | 351409a62287c7993bc680d9dfcfa13cba9c9c0c (patch) | |
| tree | 47f99908d999aa612a4cd44932dcdc3b3a1a966a /src/libsyntax/ext | |
| parent | 8c5bb80d9b8373dd3c14cde0ba79f7d507839782 (diff) | |
| download | rust-351409a62287c7993bc680d9dfcfa13cba9c9c0c.tar.gz rust-351409a62287c7993bc680d9dfcfa13cba9c9c0c.zip | |
sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/base.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/ord.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/decodable.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/encodable.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/generic/mod.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/generic/ty.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/hash.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/show.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/format.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/mtwt.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 6 |
13 files changed, 26 insertions, 26 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index e56194c95cd..91cc8a24622 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -233,7 +233,7 @@ impl MacResult for MacItems { /// Fill-in macro expansion result, to allow compilation to continue /// after hitting errors. -#[deriving(Copy)] +#[derive(Copy)] pub struct DummyResult { expr_only: bool, span: Span @@ -311,7 +311,7 @@ pub enum SyntaxExtension { /// A syntax extension that is attached to an item and creates new items /// based upon it. /// - /// `#[deriving(...)]` is an `ItemDecorator`. + /// `#[derive(...)]` is an `ItemDecorator`. Decorator(Box<ItemDecorator + 'static>), /// A syntax extension that is attached to an item and modifies it diff --git a/src/libsyntax/ext/deriving/cmp/ord.rs b/src/libsyntax/ext/deriving/cmp/ord.rs index 10e14e0c975..c02416bfbea 100644 --- a/src/libsyntax/ext/deriving/cmp/ord.rs +++ b/src/libsyntax/ext/deriving/cmp/ord.rs @@ -83,7 +83,7 @@ pub fn expand_deriving_ord<F>(cx: &mut ExtCtxt, trait_def.expand(cx, mitem, item, push) } -#[deriving(Copy)] +#[derive(Copy)] pub enum OrderingOp { PartialCmpOp, LtOp, LeOp, GtOp, GeOp, } diff --git a/src/libsyntax/ext/deriving/decodable.rs b/src/libsyntax/ext/deriving/decodable.rs index 3c8d74c14ee..882136cb862 100644 --- a/src/libsyntax/ext/deriving/decodable.rs +++ b/src/libsyntax/ext/deriving/decodable.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! The compiler code necessary for `#[deriving(Decodable)]`. See encodable.rs for more. +//! The compiler code necessary for `#[derive(Decodable)]`. See encodable.rs for more. use ast; use ast::{MetaItem, Item, Expr, MutMutable}; diff --git a/src/libsyntax/ext/deriving/encodable.rs b/src/libsyntax/ext/deriving/encodable.rs index 5829f34bccc..b2c929123d5 100644 --- a/src/libsyntax/ext/deriving/encodable.rs +++ b/src/libsyntax/ext/deriving/encodable.rs @@ -8,14 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! The compiler code necessary to implement the `#[deriving(Encodable)]` +//! The compiler code necessary to implement the `#[derive(Encodable)]` //! (and `Decodable`, in decodable.rs) extension. The idea here is that -//! type-defining items may be tagged with `#[deriving(Encodable, Decodable)]`. +//! type-defining items may be tagged with `#[derive(Encodable, Decodable)]`. //! //! For example, a type like: //! //! ```ignore -//! #[deriving(Encodable, Decodable)] +//! #[derive(Encodable, Decodable)] //! struct Node { id: uint } //! ``` //! @@ -49,7 +49,7 @@ //! references other non-built-in types. A type definition like: //! //! ```ignore -//! #[deriving(Encodable, Decodable)] +//! #[derive(Encodable, Decodable)] //! struct Spanned<T> { node: T, span: Span } //! ``` //! diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 55443dedfca..8863de8757b 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -1174,7 +1174,7 @@ impl<'a> MethodDef<'a> { } } -#[deriving(PartialEq)] // dogfooding! +#[derive(PartialEq)] // dogfooding! enum StructType { Unknown, Record, Tuple } diff --git a/src/libsyntax/ext/deriving/generic/ty.rs b/src/libsyntax/ext/deriving/generic/ty.rs index 95bdd8b9ffd..a236fa33eb1 100644 --- a/src/libsyntax/ext/deriving/generic/ty.rs +++ b/src/libsyntax/ext/deriving/generic/ty.rs @@ -24,7 +24,7 @@ use parse::token::special_idents; use ptr::P; /// The types of pointers -#[deriving(Clone)] +#[derive(Clone)] pub enum PtrTy<'a> { /// &'lifetime mut Borrowed(Option<&'a str>, ast::Mutability), @@ -34,7 +34,7 @@ pub enum PtrTy<'a> { /// A path, e.g. `::std::option::Option::<int>` (global). Has support /// for type parameters and a lifetime. -#[deriving(Clone)] +#[derive(Clone)] pub struct Path<'a> { pub path: Vec<&'a str> , pub lifetime: Option<&'a str>, @@ -85,7 +85,7 @@ impl<'a> Path<'a> { } /// A type. Supports pointers, Self, and literals -#[deriving(Clone)] +#[derive(Clone)] pub enum Ty<'a> { Self, /// &/Box/ Ty @@ -217,7 +217,7 @@ fn mk_generics(lifetimes: Vec<ast::LifetimeDef>, ty_params: Vec<ast::TyParam>) } /// Lifetimes and bounds on type parameters -#[deriving(Clone)] +#[derive(Clone)] pub struct LifetimeBounds<'a> { pub lifetimes: Vec<(&'a str, Vec<&'a str>)>, pub bounds: Vec<(&'a str, Vec<Path<'a>>)>, diff --git a/src/libsyntax/ext/deriving/hash.rs b/src/libsyntax/ext/deriving/hash.rs index 9ad0ad16217..9ff42d85cfb 100644 --- a/src/libsyntax/ext/deriving/hash.rs +++ b/src/libsyntax/ext/deriving/hash.rs @@ -99,7 +99,7 @@ fn hash_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure) } if stmts.len() == 0 { - cx.span_bug(trait_span, "#[deriving(Hash)] needs at least one field"); + cx.span_bug(trait_span, "#[derive(Hash)] needs at least one field"); } cx.expr_block(cx.block(trait_span, stmts, None)) diff --git a/src/libsyntax/ext/deriving/show.rs b/src/libsyntax/ext/deriving/show.rs index 2788c89676a..0513c75cf57 100644 --- a/src/libsyntax/ext/deriving/show.rs +++ b/src/libsyntax/ext/deriving/show.rs @@ -67,7 +67,7 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span, Struct(_) => substr.type_ident, EnumMatching(_, v, _) => v.node.name, EnumNonMatchingCollapsed(..) | StaticStruct(..) | StaticEnum(..) => { - cx.span_bug(span, "nonsensical .fields in `#[deriving(Show)]`") + cx.span_bug(span, "nonsensical .fields in `#[derive(Show)]`") } }; diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index dcf25a26e2c..e65ecc19ea1 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -802,7 +802,7 @@ fn expand_arm(arm: ast::Arm, fld: &mut MacroExpander) -> ast::Arm { /// A visitor that extracts the PatIdent (binding) paths /// from a given thingy and puts them in a mutable /// array -#[deriving(Clone)] +#[derive(Clone)] struct PatIdentFinder { ident_accumulator: Vec<ast::Ident> } @@ -1320,7 +1320,7 @@ mod test { // a visitor that extracts the paths // from a given thingy and puts them in a mutable // array (passed in to the traversal) - #[deriving(Clone)] + #[derive(Clone)] struct PathExprFinderContext { path_accumulator: Vec<ast::Path> , } diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index 500070a14d2..1f39555f496 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -24,7 +24,7 @@ use ptr::P; use std::collections::HashMap; use std::iter::repeat; -#[deriving(PartialEq)] +#[derive(PartialEq)] enum ArgumentType { Known(String), Unsigned diff --git a/src/libsyntax/ext/mtwt.rs b/src/libsyntax/ext/mtwt.rs index 6a296333fdb..bac82494f28 100644 --- a/src/libsyntax/ext/mtwt.rs +++ b/src/libsyntax/ext/mtwt.rs @@ -39,7 +39,7 @@ pub struct SCTable { rename_memo: RefCell<HashMap<(SyntaxContext,Ident,Name),SyntaxContext>>, } -#[deriving(PartialEq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] +#[derive(PartialEq, RustcEncodable, RustcDecodable, Hash, Show, Copy)] pub enum SyntaxContext_ { EmptyCtxt, Mark (Mrk,SyntaxContext), @@ -312,7 +312,7 @@ mod tests { // because of the SCTable, I now need a tidy way of // creating syntax objects. Sigh. - #[deriving(Clone, PartialEq, Show)] + #[derive(Clone, PartialEq, Show)] enum TestSC { M(Mrk), R(Ident,Name) diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 65ecf701e8d..69e473055e8 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -103,7 +103,7 @@ use std::collections::hash_map::Entry::{Vacant, Occupied}; // To avoid costly uniqueness checks, we require that `MatchSeq` always has // a nonempty body. -#[deriving(Clone)] +#[derive(Clone)] enum TokenTreeOrTokenTreeVec { Tt(ast::TokenTree), TtSeq(Rc<Vec<ast::TokenTree>>), @@ -126,13 +126,13 @@ impl TokenTreeOrTokenTreeVec { } /// an unzipping of `TokenTree`s -#[deriving(Clone)] +#[derive(Clone)] struct MatcherTtFrame { elts: TokenTreeOrTokenTreeVec, idx: uint, } -#[deriving(Clone)] +#[derive(Clone)] pub struct MatcherPos { stack: Vec<MatcherTtFrame>, top_elts: TokenTreeOrTokenTreeVec, diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 8af5e952e9a..86e81ede8b0 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -24,7 +24,7 @@ use std::ops::Add; use std::collections::HashMap; ///an unzipping of `TokenTree`s -#[deriving(Clone)] +#[derive(Clone)] struct TtFrame { forest: TokenTree, idx: uint, @@ -32,7 +32,7 @@ struct TtFrame { sep: Option<Token>, } -#[deriving(Clone)] +#[derive(Clone)] pub struct TtReader<'a> { pub sp_diag: &'a SpanHandler, /// the unzipped tree: @@ -99,7 +99,7 @@ fn lookup_cur_matched(r: &TtReader, name: Ident) -> Option<Rc<NamedMatch>> { matched_opt.map(|s| lookup_cur_matched_by_matched(r, s)) } -#[deriving(Clone)] +#[derive(Clone)] enum LockstepIterSize { LisUnconstrained, LisConstraint(uint, Ident), |
