Support unsized types with the type keyword
This commit is contained in:
@@ -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
|
||||
@@ -1051,6 +1052,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,
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user