pub struct TyParam {
pub ident: Ident,
pub id: NodeId,
- pub sized: Sized,
pub bounds: OwnedSlice<TyParamBound>,
+ pub unbound: Option<TyParamBound>,
pub default: Option<P<Ty>>,
pub span: Span
}
}
}
-#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash)]
-pub enum Sized {
- DynSize,
- StaticSize,
-}
-
#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash)]
pub struct StructField_ {
pub kind: StructFieldKind,
ItemEnum(EnumDef, Generics),
ItemStruct(Gc<StructDef>, Generics),
/// Represents a Trait Declaration
- ItemTrait(Generics, Sized, Vec<TraitRef> , Vec<TraitMethod> ),
+ ItemTrait(Generics,
+ Option<TyParamBound>, // (optional) default bound not required for Self.
+ // Currently, only Sized makes sense here.
+ Vec<TraitRef> ,
+ Vec<TraitMethod>),
ItemImpl(Generics,
Option<TraitRef>, // (optional) trait this impl implements
P<Ty>, // self