]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_save_analysis/dump_visitor.rs
Rename `Item.node` to `Item.kind`
[rust.git] / src / librustc_save_analysis / dump_visitor.rs
index 55f6b91e7143106e336086ffb4ef0142f6969222..d81d24e3a1b99895c1cd5c69de3e330b2a13b97b 100644 (file)
@@ -385,7 +385,7 @@ fn process_fn(
             }
 
             if let ast::FunctionRetTy::Ty(ref ret_ty) = decl.output {
-                if let ast::TyKind::ImplTrait(..) = ret_ty.node {
+                if let ast::TyKind::ImplTrait(..) = ret_ty.kind {
                     // FIXME: Opaque type desugaring prevents us from easily
                     // processing trait bounds. See `visit_ty` for more details.
                 } else {
@@ -472,13 +472,13 @@ fn process_struct(
         let qualname = format!("::{}",
             self.tcx.def_path_str(self.tcx.hir().local_def_id_from_node_id(item.id)));
 
-        let kind = match item.node {
+        let kind = match item.kind {
             ast::ItemKind::Struct(_, _) => DefKind::Struct,
             ast::ItemKind::Union(_, _) => DefKind::Union,
             _ => unreachable!(),
         };
 
-        let (value, fields) = match item.node {
+        let (value, fields) = match item.kind {
             ast::ItemKind::Struct(ast::VariantData::Struct(ref fields, ..), ..) |
             ast::ItemKind::Union(ast::VariantData::Struct(ref fields, ..), ..) => {
                 let include_priv_fields = !self.save_ctxt.config.pub_only;
@@ -864,7 +864,7 @@ fn process_method_call(
     }
 
     fn process_pat(&mut self, p: &'l ast::Pat) {
-        match p.node {
+        match p.kind {
             PatKind::Struct(ref _path, ref fields, _) => {
                 // FIXME do something with _path?
                 let hir_id = self.tcx.hir().node_to_hir_id(p.id);
@@ -1007,7 +1007,7 @@ fn process_macro_use(&mut self, _span: Span) {
     fn process_trait_item(&mut self, trait_item: &'l ast::TraitItem, trait_id: DefId) {
         self.process_macro_use(trait_item.span);
         let vis_span = trait_item.span.shrink_to_lo();
-        match trait_item.node {
+        match trait_item.kind {
             ast::TraitItemKind::Const(ref ty, ref expr) => {
                 self.process_assoc_const(
                     trait_item.id,
@@ -1078,7 +1078,7 @@ fn process_trait_item(&mut self, trait_item: &'l ast::TraitItem, trait_id: DefId
 
     fn process_impl_item(&mut self, impl_item: &'l ast::ImplItem, impl_id: DefId) {
         self.process_macro_use(impl_item.span);
-        match impl_item.node {
+        match impl_item.kind {
             ast::ImplItemKind::Const(ref ty, ref expr) => {
                 self.process_assoc_const(
                     impl_item.id,
@@ -1276,7 +1276,7 @@ fn visit_mod(&mut self, m: &'l ast::Mod, span: Span, attrs: &[ast::Attribute], i
     fn visit_item(&mut self, item: &'l ast::Item) {
         use syntax::ast::ItemKind::*;
         self.process_macro_use(item.span);
-        match item.node {
+        match item.kind {
             Use(ref use_tree) => {
                 let prefix = ast::Path {
                     segments: vec![],
@@ -1421,7 +1421,7 @@ fn visit_generics(&mut self, generics: &'l ast::Generics) {
 
     fn visit_ty(&mut self, t: &'l ast::Ty) {
         self.process_macro_use(t.span);
-        match t.node {
+        match t.kind {
             ast::TyKind::Path(_, ref path) => {
                 if generated_code(t.span) {
                     return;
@@ -1461,9 +1461,9 @@ fn visit_ty(&mut self, t: &'l ast::Ty) {
     }
 
     fn visit_expr(&mut self, ex: &'l ast::Expr) {
-        debug!("visit_expr {:?}", ex.node);
+        debug!("visit_expr {:?}", ex.kind);
         self.process_macro_use(ex.span);
-        match ex.node {
+        match ex.kind {
             ast::ExprKind::Struct(ref path, ref fields, ref base) => {
                 let expr_hir_id = self.save_ctxt.tcx.hir().node_to_hir_id(ex.id);
                 let hir_expr = self.save_ctxt.tcx.hir().expect_expr(expr_hir_id);
@@ -1509,7 +1509,7 @@ fn visit_expr(&mut self, ex: &'l ast::Expr) {
             }
             ast::ExprKind::ForLoop(ref pattern, ref subexpression, ref block, _) => {
                 self.process_var_decl(pattern);
-                debug!("for loop, walk sub-expr: {:?}", subexpression.node);
+                debug!("for loop, walk sub-expr: {:?}", subexpression.kind);
                 self.visit_expr(subexpression);
                 visit::walk_block(self, block);
             }