Skip to content

Commit

Permalink
Add a few more derivings to AST types
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimundi committed Jul 29, 2014
1 parent 26a39f2 commit da6070d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/libsyntax/ast.rs
Expand Up @@ -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>>),
Expand Down Expand Up @@ -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>,
Expand All @@ -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>),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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>,
Expand Down Expand Up @@ -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>,
Expand All @@ -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),
Expand All @@ -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>),
Expand Down

5 comments on commit da6070d

@bors
Copy link
Contributor

@bors bors commented on da6070d Jul 31, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from nikomatsakis
at Kimundi@da6070d

@bors
Copy link
Contributor

@bors bors commented on da6070d Jul 31, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging Kimundi/rust/fix_folder = da6070d into auto

@bors
Copy link
Contributor

@bors bors commented on da6070d Jul 31, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kimundi/rust/fix_folder = da6070d merged ok, testing candidate = 8c00357

@bors
Copy link
Contributor

@bors bors commented on da6070d Jul 31, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 8c00357

Please sign in to comment.