pub struct Module {
name: Option<Ident>,
- attrs: ~[ast::Attribute],
+ attrs: Vec<ast::Attribute> ,
where: Span,
- structs: ~[Struct],
- enums: ~[Enum],
- fns: ~[Function],
- mods: ~[Module],
+ structs: Vec<Struct> ,
+ enums: Vec<Enum> ,
+ fns: Vec<Function> ,
+ mods: Vec<Module> ,
id: NodeId,
- typedefs: ~[Typedef],
- statics: ~[Static],
- traits: ~[Trait],
+ typedefs: Vec<Typedef> ,
+ statics: Vec<Static> ,
+ traits: Vec<Trait> ,
vis: ast::Visibility,
- impls: ~[Impl],
- foreigns: ~[ast::ForeignMod],
- view_items: ~[ast::ViewItem],
- macros: ~[Macro],
+ impls: Vec<Impl> ,
+ foreigns: Vec<ast::ForeignMod> ,
+ view_items: Vec<ast::ViewItem> ,
+ macros: Vec<Macro> ,
is_crate: bool,
}
id: 0,
vis: ast::Private,
where: syntax::codemap::DUMMY_SP,
- attrs : ~[],
- structs : ~[],
- enums : ~[],
- fns : ~[],
- mods : ~[],
- typedefs : ~[],
- statics : ~[],
- traits : ~[],
- impls : ~[],
- view_items : ~[],
- foreigns : ~[],
- macros : ~[],
+ attrs : Vec::new(),
+ structs : Vec::new(),
+ enums : Vec::new(),
+ fns : Vec::new(),
+ mods : Vec::new(),
+ typedefs : Vec::new(),
+ statics : Vec::new(),
+ traits : Vec::new(),
+ impls : Vec::new(),
+ view_items : Vec::new(),
+ foreigns : Vec::new(),
+ macros : Vec::new(),
is_crate : false,
}
}
struct_type: StructType,
name: Ident,
generics: ast::Generics,
- attrs: ~[ast::Attribute],
- fields: ~[ast::StructField],
+ attrs: Vec<ast::Attribute> ,
+ fields: Vec<ast::StructField> ,
where: Span,
}
pub struct Enum {
vis: ast::Visibility,
- variants: ~[Variant],
+ variants: Vec<Variant> ,
generics: ast::Generics,
- attrs: ~[ast::Attribute],
+ attrs: Vec<ast::Attribute> ,
id: NodeId,
where: Span,
name: Ident,
pub struct Variant {
name: Ident,
- attrs: ~[ast::Attribute],
+ attrs: Vec<ast::Attribute> ,
kind: ast::VariantKind,
id: ast::NodeId,
vis: ast::Visibility,
pub struct Function {
decl: ast::FnDecl,
- attrs: ~[ast::Attribute],
+ attrs: Vec<ast::Attribute> ,
id: NodeId,
name: Ident,
vis: ast::Visibility,
gen: ast::Generics,
name: Ident,
id: ast::NodeId,
- attrs: ~[ast::Attribute],
+ attrs: Vec<ast::Attribute> ,
where: Span,
vis: ast::Visibility,
}
mutability: ast::Mutability,
expr: @ast::Expr,
name: Ident,
- attrs: ~[ast::Attribute],
+ attrs: Vec<ast::Attribute> ,
vis: ast::Visibility,
id: ast::NodeId,
where: Span,
pub struct Trait {
name: Ident,
- methods: ~[ast::TraitMethod], //should be TraitMethod
+ methods: Vec<ast::TraitMethod> , //should be TraitMethod
generics: ast::Generics,
- parents: ~[ast::TraitRef],
- attrs: ~[ast::Attribute],
+ parents: Vec<ast::TraitRef> ,
+ attrs: Vec<ast::Attribute> ,
id: ast::NodeId,
where: Span,
vis: ast::Visibility,
generics: ast::Generics,
trait_: Option<ast::TraitRef>,
for_: ast::P<ast::Ty>,
- methods: ~[@ast::Method],
- attrs: ~[ast::Attribute],
+ methods: Vec<@ast::Method> ,
+ attrs: Vec<ast::Attribute> ,
where: Span,
vis: ast::Visibility,
id: ast::NodeId,
pub struct Macro {
name: Ident,
id: ast::NodeId,
- attrs: ~[ast::Attribute],
+ attrs: Vec<ast::Attribute> ,
where: Span,
}