]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/build.rs
Rename `Item.node` to `Item.kind`
[rust.git] / src / libsyntax / ext / build.rs
index f903b66e2961d4e2487bd58ae634b195b283b739..6b93d045588b9242b62080aecb23cf6fc3704e3d 100644 (file)
@@ -54,11 +54,11 @@ pub fn ty_mt(&self, ty: P<ast::Ty>, mutbl: ast::Mutability) -> ast::MutTy {
         }
     }
 
-    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,
         })
     }
 
@@ -73,12 +73,12 @@ pub fn ty_ident(&self, span: Span, ident: ast::Ident)
         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(),
             })
@@ -171,7 +171,7 @@ pub fn stmt_expr(&self, expr: P<ast::Expr>) -> ast::Stmt {
         ast::Stmt {
             id: ast::DUMMY_NODE_ID,
             span: expr.span,
-            node: ast::StmtKind::Expr(expr),
+            kind: ast::StmtKind::Expr(expr),
         }
     }
 
@@ -193,7 +193,7 @@ pub fn stmt_let(&self, sp: Span, mutbl: bool, ident: ast::Ident,
         });
         ast::Stmt {
             id: ast::DUMMY_NODE_ID,
-            node: ast::StmtKind::Local(local),
+            kind: ast::StmtKind::Local(local),
             span: sp,
         }
     }
@@ -210,7 +210,7 @@ pub fn stmt_let_type_only(&self, span: Span, ty: P<ast::Ty>) -> ast::Stmt {
         });
         ast::Stmt {
             id: ast::DUMMY_NODE_ID,
-            node: ast::StmtKind::Local(local),
+            kind: ast::StmtKind::Local(local),
             span,
         }
     }
@@ -218,7 +218,7 @@ pub fn stmt_let_type_only(&self, span: Span, ty: P<ast::Ty>) -> ast::Stmt {
     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,
         }
     }
@@ -227,7 +227,7 @@ pub fn block_expr(&self, expr: P<ast::Expr>) -> P<ast::Block> {
         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> {
@@ -239,10 +239,10 @@ 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(),
         })
@@ -411,8 +411,8 @@ pub fn expr_try(&self, sp: Span, head: P<ast::Expr>) -> P<ast::Expr> {
     }
 
 
-    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)
@@ -567,14 +567,14 @@ pub fn fn_decl(&self, inputs: Vec<ast::Param>, output: ast::FunctionRetTy) -> P<
     }
 
     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,