}
}
- pub fn ty(&self, span: Span, ty: ast::TyKind) -> P<ast::Ty> {
+ pub fn ty(&self, span: Span, kind: ast::TyKind) -> P<ast::Ty> {
P(ast::Ty {
id: ast::DUMMY_NODE_ID,
span,
- node: ty
+ kind,
})
}
self.ty_path(self.path_ident(span, ident))
}
- pub fn anon_const(&self, span: Span, expr: ast::ExprKind) -> ast::AnonConst {
+ pub fn anon_const(&self, span: Span, kind: ast::ExprKind) -> ast::AnonConst {
ast::AnonConst {
id: ast::DUMMY_NODE_ID,
value: P(ast::Expr {
id: ast::DUMMY_NODE_ID,
- node: expr,
+ kind,
span,
attrs: ThinVec::new(),
})
ast::Stmt {
id: ast::DUMMY_NODE_ID,
span: expr.span,
- node: ast::StmtKind::Expr(expr),
+ kind: ast::StmtKind::Expr(expr),
}
}
});
ast::Stmt {
id: ast::DUMMY_NODE_ID,
- node: ast::StmtKind::Local(local),
+ kind: ast::StmtKind::Local(local),
span: sp,
}
}
});
ast::Stmt {
id: ast::DUMMY_NODE_ID,
- node: ast::StmtKind::Local(local),
+ kind: ast::StmtKind::Local(local),
span,
}
}
pub fn stmt_item(&self, sp: Span, item: P<ast::Item>) -> ast::Stmt {
ast::Stmt {
id: ast::DUMMY_NODE_ID,
- node: ast::StmtKind::Item(item),
+ kind: ast::StmtKind::Item(item),
span: sp,
}
}
self.block(expr.span, vec![ast::Stmt {
id: ast::DUMMY_NODE_ID,
span: expr.span,
- node: ast::StmtKind::Expr(expr),
+ kind: ast::StmtKind::Expr(expr),
}])
}
pub fn block(&self, span: Span, stmts: Vec<ast::Stmt>) -> P<ast::Block> {
})
}
- pub fn expr(&self, span: Span, node: ast::ExprKind) -> P<ast::Expr> {
+ pub fn expr(&self, span: Span, kind: ast::ExprKind) -> P<ast::Expr> {
P(ast::Expr {
id: ast::DUMMY_NODE_ID,
- node,
+ kind,
span,
attrs: ThinVec::new(),
})
}
- pub fn pat(&self, span: Span, pat: PatKind) -> P<ast::Pat> {
- P(ast::Pat { id: ast::DUMMY_NODE_ID, node: pat, span })
+ pub fn pat(&self, span: Span, kind: PatKind) -> P<ast::Pat> {
+ P(ast::Pat { id: ast::DUMMY_NODE_ID, kind, span })
}
pub fn pat_wild(&self, span: Span) -> P<ast::Pat> {
self.pat(span, PatKind::Wild)
}
pub fn item(&self, span: Span, name: Ident,
- attrs: Vec<ast::Attribute>, node: ast::ItemKind) -> P<ast::Item> {
+ attrs: Vec<ast::Attribute>, kind: ast::ItemKind) -> P<ast::Item> {
// FIXME: Would be nice if our generated code didn't violate
// Rust coding conventions
P(ast::Item {
ident: name,
attrs,
id: ast::DUMMY_NODE_ID,
- node,
+ kind,
vis: respan(span.shrink_to_lo(), ast::VisibilityKind::Inherited),
span,
tokens: None,