diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-04-03 13:38:45 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-04-23 12:30:58 +1200 |
| commit | f78add10cde772b9d743a84a604dc584b63a06fc (patch) | |
| tree | bc159ccd2a18de0a71e4163e48b64cc31ae9dbcb /src/libsyntax/ast.rs | |
| parent | c3b2f2b0c6f074fb98add56a1977d407e294c9ed (diff) | |
| download | rust-f78add10cde772b9d743a84a604dc584b63a06fc.tar.gz rust-f78add10cde772b9d743a84a604dc584b63a06fc.zip | |
Support unsized types with the `type` keyword
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 5d0b24fdb3e..97ddff78789 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -180,6 +180,7 @@ pub enum TyParamBound { pub struct TyParam { pub ident: Ident, pub id: NodeId, + pub sized: Sized, pub bounds: OwnedSlice<TyParamBound>, pub default: Option<P<Ty>>, pub span: Span @@ -1052,6 +1053,12 @@ impl Visibility { } #[deriving(Clone, Eq, TotalEq, Encodable, Decodable, Hash)] +pub enum Sized { + DynSize, + StaticSize, +} + +#[deriving(Clone, Eq, TotalEq, Encodable, Decodable, Hash)] pub struct StructField_ { pub kind: StructFieldKind, pub id: NodeId, @@ -1109,7 +1116,7 @@ pub enum Item_ { ItemTy(P<Ty>, Generics), ItemEnum(EnumDef, Generics), ItemStruct(@StructDef, Generics), - ItemTrait(Generics, Vec<TraitRef> , Vec<TraitMethod> ), + ItemTrait(Generics, Sized, Vec<TraitRef> , Vec<TraitMethod> ), ItemImpl(Generics, Option<TraitRef>, // (optional) trait this impl implements P<Ty>, // self |
