diff options
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 1ff8ca10fff..c658a5c3192 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -245,6 +245,7 @@ pub struct TyParam { pub struct Generics { pub lifetimes: Vec<LifetimeDef>, pub ty_params: OwnedSlice<TyParam>, + pub where_clause: WhereClause, } impl Generics { @@ -259,9 +260,23 @@ impl Generics { } } +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] +pub struct WhereClause { + pub id: NodeId, + pub predicates: Vec<WherePredicate>, +} + +#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] +pub struct WherePredicate { + pub id: NodeId, + pub span: Span, + pub ident: Ident, + pub bounds: OwnedSlice<TyParamBound>, +} + /// The set of MetaItems that define the compilation environment of the crate, /// used to drive conditional compilation -pub type CrateConfig = Vec<Gc<MetaItem>> ; +pub type CrateConfig = Vec<Gc<MetaItem>>; #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub struct Crate { |
