diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2014-07-26 03:58:48 +0200 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2014-07-29 12:32:32 +0200 |
| commit | da6070dbef81c1028ce3e87fd0102b2abbbc181e (patch) | |
| tree | c1791018cd8af26b3df00b11e0b0db6b44cbb06b /src | |
| parent | 26a39f23ce09b64c9718f3ee6535f7ca4e84c7e7 (diff) | |
| download | rust-da6070dbef81c1028ce3e87fd0102b2abbbc181e.tar.gz rust-da6070dbef81c1028ce3e87fd0102b2abbbc181e.zip | |
Add a few more derivings to AST types
Diffstat (limited to 'src')
| -rw-r--r-- | src/libsyntax/ast.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 34de8100871..8159aee99d1 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -261,7 +261,7 @@ pub struct Crate { pub type MetaItem = Spanned<MetaItem_>; -#[deriving(Clone, Encodable, Decodable, Eq, Hash, Show)] +#[deriving(Clone, Eq, Encodable, Decodable, Hash, Show)] pub enum MetaItem_ { MetaWord(InternedString), MetaList(InternedString, Vec<Gc<MetaItem>>), @@ -423,7 +423,7 @@ pub enum LocalSource { // FIXME (pending discussion of #1697, #2178...): local should really be // a refinement on pat. /// Local represents a `let` statement, e.g., `let <pat>:<ty> = <expr>;` -#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub struct Local { pub ty: P<Ty>, pub pat: Gc<Pat>, @@ -435,7 +435,7 @@ pub struct Local { pub type Decl = Spanned<Decl_>; -#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub enum Decl_ { /// A local (let) binding: DeclLocal(Gc<Local>), @@ -677,7 +677,7 @@ pub struct MutTy { pub mutbl: Mutability, } -#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub struct TypeField { pub ident: Ident, pub mt: MutTy, @@ -1048,7 +1048,7 @@ pub type PathListItem = Spanned<PathListItem_>; pub type ViewPath = Spanned<ViewPath_>; -#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub enum ViewPath_ { /// `quux = foo::bar::baz` @@ -1113,7 +1113,7 @@ pub struct Attribute_ { /// that the ref_id is for. The impl_id maps to the "self type" of this impl. /// If this impl is an ItemImpl, the impl_id is redundant (it could be the /// same as the impl's node id). -#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub struct TraitRef { pub path: Path, pub ref_id: NodeId, @@ -1169,7 +1169,7 @@ impl StructFieldKind { } } -#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub struct StructDef { /// Fields, not including ctor pub fields: Vec<StructField>, @@ -1219,7 +1219,7 @@ pub enum Item_ { ItemMac(Mac), } -#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub struct ForeignItem { pub ident: Ident, pub attrs: Vec<Attribute>, @@ -1229,7 +1229,7 @@ pub struct ForeignItem { pub vis: Visibility, } -#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub enum ForeignItem_ { ForeignItemFn(P<FnDecl>, Generics), ForeignItemStatic(P<Ty>, /* is_mutbl */ bool), @@ -1238,7 +1238,7 @@ pub enum ForeignItem_ { /// The data we save and restore about an inlined item or method. This is not /// part of the AST that we parse from a file, but it becomes part of the tree /// that we trans. -#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub enum InlinedItem { IIItem(Gc<Item>), IIMethod(DefId /* impl id */, bool /* is provided */, Gc<Method>), |
