diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2015-03-11 23:38:58 +0200 | 
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2015-03-11 23:39:16 +0200 | 
| commit | 9da918548d77182ca64f375fb6da24036d5ad60c (patch) | |
| tree | f04e278a2ffe86f73f9499fa6d23e4dd14faa3c6 /src/libsyntax/ast.rs | |
| parent | ce10fa8d12cb20d9eee59fffeeaadfcca8badf4a (diff) | |
| download | rust-9da918548d77182ca64f375fb6da24036d5ad60c.tar.gz rust-9da918548d77182ca64f375fb6da24036d5ad60c.zip | |
syntax: move MethMac to MacImplItem and combine {Provided,Required}Method into MethodTraitItem.
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 15 | 
1 files changed, 3 insertions, 12 deletions
| diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 0a08b0b1207..657ffcaece9 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -33,7 +33,6 @@ pub use self::LocalSource::*; pub use self::Mac_::*; pub use self::MacStmtStyle::*; pub use self::MetaItem_::*; -pub use self::Method::*; pub use self::Mutability::*; pub use self::Pat_::*; pub use self::PathListItem_::*; @@ -1084,8 +1083,7 @@ pub struct TraitItem { #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum TraitItem_ { - RequiredMethod(MethodSig), - ProvidedMethod(Method), + MethodTraitItem(MethodSig, Option<P<Block>>), TypeTraitItem(TyParamBounds, Option<P<Ty>>), } @@ -1101,8 +1099,9 @@ pub struct ImplItem { #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum ImplItem_ { - MethodImplItem(Method), + MethodImplItem(MethodSig, P<Block>), TypeImplItem(P<Ty>), + MacImplItem(Mac), } #[derive(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Copy)] @@ -1417,14 +1416,6 @@ pub enum ExplicitSelf_ { pub type ExplicitSelf = Spanned<ExplicitSelf_>; #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] -pub enum Method { - /// Represents a method declaration - MethDecl(MethodSig, P<Block>), - /// Represents a macro in method position - MethMac(Mac), -} - -#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Mod { /// A span from the first token past `{` to the last token until `}`. /// For `mod foo;`, the inner span ranges from the first token | 
