fn ty_vars(&self, ty_params: &OwnedSlice<ast::TyParam>) -> Vec<P<ast::Ty>> ;
fn ty_vars_global(&self, ty_params: &OwnedSlice<ast::TyParam>) -> Vec<P<ast::Ty>> ;
- fn ty_field_imm(&self, span: Span, name: Ident, ty: P<ast::Ty>) -> ast::TypeField;
fn typaram(&self,
span: Span,
Vec::new()))
}
- fn ty_field_imm(&self, span: Span, name: Ident, ty: P<ast::Ty>) -> ast::TypeField {
- ast::TypeField {
- ident: name,
- mt: ast::MutTy { ty: ty, mutbl: ast::MutImmutable },
- span: span,
- }
- }
-
fn ty_infer(&self, span: Span) -> P<ast::Ty> {
self.ty(span, ast::TyInfer)
}
}
fn expr_match(&self, span: Span, arg: P<ast::Expr>, arms: Vec<ast::Arm>) -> P<Expr> {
- self.expr(span, ast::ExprMatch(arg, arms, ast::MatchSource::Normal))
+ self.expr(span, ast::ExprMatch(arg, arms))
}
fn expr_if(&self, span: Span, cond: P<ast::Expr>,
}
fn variant(&self, span: Span, name: Ident, tys: Vec<P<ast::Ty>> ) -> ast::Variant {
- let args = tys.into_iter().map(|ty| {
- ast::VariantArg { ty: ty, id: ast::DUMMY_NODE_ID }
+ let fields = tys.into_iter().map(|ty| {
+ Spanned { span: ty.span, node: ast::StructField_ {
+ ty: ty,
+ kind: ast::UnnamedField(ast::Inherited),
+ attrs: Vec::new(),
+ id: ast::DUMMY_NODE_ID,
+ }}
}).collect();
respan(span,
ast::Variant_ {
name: name,
attrs: Vec::new(),
- kind: ast::TupleVariantKind(args),
+ def: P(ast::StructDef { fields: fields, ctor_id: Some(ast::DUMMY_NODE_ID) }),
id: ast::DUMMY_NODE_ID,
disr_expr: None,
})
fn attribute(&self, sp: Span, mi: P<ast::MetaItem>) -> ast::Attribute {
respan(sp, ast::Attribute_ {
id: attr::mk_attr_id(),
- style: ast::AttrOuter,
+ style: ast::AttrStyle::Outer,
value: mi,
is_sugared_doc: false,
})