about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-09-26 18:04:05 +0100
committervarkor <github@varkor.com>2019-09-26 18:21:48 +0100
commit38121173e27d304366c6fd422318e1e424941b7c (patch)
tree9016704208a96e5da5e8918388f512ba5f03a638
parentb4748679611c97c09cfb7096917d7830c410a4ad (diff)
downloadrust-38121173e27d304366c6fd422318e1e424941b7c.tar.gz
rust-38121173e27d304366c6fd422318e1e424941b7c.zip
Rename `MetaItem.node` to `MetaItem.kind`
-rw-r--r--src/librustc/ich/impls_syntax.rs2
-rw-r--r--src/librustc/lint/levels.rs4
-rw-r--r--src/librustc/middle/lib_features.rs2
-rw-r--r--src/librustc/session/config.rs2
-rw-r--r--src/librustc_driver/lib.rs2
-rw-r--r--src/librustc_interface/util.rs2
-rw-r--r--src/librustc_resolve/build_reduced_graph.rs2
-rw-r--r--src/librustc_typeck/collect.rs4
-rw-r--r--src/librustdoc/clean/cfg.rs2
-rw-r--r--src/librustdoc/clean/cfg/tests.rs4
-rw-r--r--src/librustdoc/clean/mod.rs4
-rw-r--r--src/libsyntax/ast.rs2
-rw-r--r--src/libsyntax/attr/builtin.rs14
-rw-r--r--src/libsyntax/attr/mod.rs36
-rw-r--r--src/libsyntax/ext/expand.rs4
-rw-r--r--src/libsyntax/mut_visit.rs4
-rw-r--r--src/libsyntax/parse/attr.rs6
-rw-r--r--src/libsyntax/parse/parser/path.rs2
-rw-r--r--src/libsyntax/print/pprust.rs2
19 files changed, 50 insertions, 50 deletions
diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs
index 281c6c6c1ec..91c6c968f98 100644
--- a/src/librustc/ich/impls_syntax.rs
+++ b/src/librustc/ich/impls_syntax.rs
@@ -361,7 +361,7 @@ impl_stable_hash_for!(enum ::syntax::ast::NestedMetaItem {
 
 impl_stable_hash_for!(struct ::syntax::ast::MetaItem {
     path,
-    node,
+    kind,
     span
 });
 
diff --git a/src/librustc/lint/levels.rs b/src/librustc/lint/levels.rs
index 9c70cae8477..16d19e41db4 100644
--- a/src/librustc/lint/levels.rs
+++ b/src/librustc/lint/levels.rs
@@ -218,7 +218,7 @@ impl<'a> LintLevelsBuilder<'a> {
             let mut reason = None;
             let tail_li = &metas[metas.len()-1];
             if let Some(item) = tail_li.meta_item() {
-                match item.node {
+                match item.kind {
                     ast::MetaItemKind::Word => {}  // actual lint names handled later
                     ast::MetaItemKind::NameValue(ref name_value) => {
                         if item.path == sym::reason {
@@ -264,7 +264,7 @@ impl<'a> LintLevelsBuilder<'a> {
                         let mut err = bad_attr(sp);
                         let mut add_label = true;
                         if let Some(item) = li.meta_item() {
-                            if let ast::MetaItemKind::NameValue(_) = item.node {
+                            if let ast::MetaItemKind::NameValue(_) = item.kind {
                                 if item.path == sym::reason {
                                     err.span_label(sp, "reason in lint attribute must come last");
                                     add_label = false;
diff --git a/src/librustc/middle/lib_features.rs b/src/librustc/middle/lib_features.rs
index 0d6d016e507..2d726fcd176 100644
--- a/src/librustc/middle/lib_features.rs
+++ b/src/librustc/middle/lib_features.rs
@@ -59,7 +59,7 @@ impl LibFeatureCollector<'tcx> {
             attr.check_name(**stab_attr)
         }) {
             let meta_item = attr.meta();
-            if let Some(MetaItem { node: MetaItemKind::List(ref metas), .. }) = meta_item {
+            if let Some(MetaItem { kind: MetaItemKind::List(ref metas), .. }) = meta_item {
                 let mut feature = None;
                 let mut since = None;
                 for meta in metas {
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index d45479f9cca..73b731b0761 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1879,7 +1879,7 @@ pub fn parse_cfgspecs(cfgspecs: Vec<String>) -> FxHashSet<(String, Option<String
                     if meta_item.path.segments.len() != 1 {
                         error!("argument key must be an identifier");
                     }
-                    match &meta_item.node {
+                    match &meta_item.kind {
                         MetaItemKind::List(..) => {
                             error!(r#"expected `key` or `key="value"`"#);
                         }
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 4a868136741..774a5af1b1c 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -700,7 +700,7 @@ impl RustcDefaultCalls {
                     let mut cfgs = sess.parse_sess.config.iter().filter_map(|&(name, ref value)| {
                         let gated_cfg = GatedCfg::gate(&ast::MetaItem {
                             path: ast::Path::from_ident(ast::Ident::with_dummy_span(name)),
-                            node: ast::MetaItemKind::Word,
+                            kind: ast::MetaItemKind::Word,
                             span: DUMMY_SP,
                         });
 
diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs
index b0f7766472d..72df875fc8f 100644
--- a/src/librustc_interface/util.rs
+++ b/src/librustc_interface/util.rs
@@ -556,7 +556,7 @@ pub fn collect_crate_types(session: &Session, attrs: &[ast::Attribute]) -> Vec<c
                             sym::bin
                         ];
 
-                        if let ast::MetaItemKind::NameValue(spanned) = a.meta().unwrap().node {
+                        if let ast::MetaItemKind::NameValue(spanned) = a.meta().unwrap().kind {
                             let span = spanned.span;
                             let lev_candidate = find_best_match_for_name(
                                 crate_types.iter(),
diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs
index 9f0337f21c1..f76aa95dd2c 100644
--- a/src/librustc_resolve/build_reduced_graph.rs
+++ b/src/librustc_resolve/build_reduced_graph.rs
@@ -944,7 +944,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
                 }
                 let ill_formed = |span| span_err!(self.r.session, span, E0466, "bad macro import");
                 match attr.meta() {
-                    Some(meta) => match meta.node {
+                    Some(meta) => match meta.kind {
                         MetaItemKind::Word => {
                             import_all = Some(meta.span);
                             break;
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs
index 1e642a8b9cc..3ac3ce2a02c 100644
--- a/src/librustc_typeck/collect.rs
+++ b/src/librustc_typeck/collect.rs
@@ -2653,7 +2653,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
         if attr.path != sym::inline {
             return ia;
         }
-        match attr.meta().map(|i| i.node) {
+        match attr.meta().map(|i| i.kind) {
             Some(MetaItemKind::Word) => {
                 mark_used(attr);
                 InlineAttr::Hint
@@ -2694,7 +2694,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
             return ia;
         }
         let err = |sp, s| span_err!(tcx.sess.diagnostic(), sp, E0722, "{}", s);
-        match attr.meta().map(|i| i.node) {
+        match attr.meta().map(|i| i.kind) {
             Some(MetaItemKind::Word) => {
                 err(attr.span, "expected one argument");
                 ia
diff --git a/src/librustdoc/clean/cfg.rs b/src/librustdoc/clean/cfg.rs
index ac8fb1f9e95..da3b52afadf 100644
--- a/src/librustdoc/clean/cfg.rs
+++ b/src/librustdoc/clean/cfg.rs
@@ -68,7 +68,7 @@ impl Cfg {
                 span: cfg.span
             }),
         };
-        match cfg.node {
+        match cfg.kind {
             MetaItemKind::Word => Ok(Cfg::Cfg(name, None)),
             MetaItemKind::NameValue(ref lit) => match lit.kind {
                 LitKind::Str(value, _) => Ok(Cfg::Cfg(name, Some(value))),
diff --git a/src/librustdoc/clean/cfg/tests.rs b/src/librustdoc/clean/cfg/tests.rs
index ec5d86b2c61..e5fd91b5f76 100644
--- a/src/librustdoc/clean/cfg/tests.rs
+++ b/src/librustdoc/clean/cfg/tests.rs
@@ -17,7 +17,7 @@ fn name_value_cfg(name: &str, value: &str) -> Cfg {
 fn dummy_meta_item_word(name: &str) -> MetaItem {
     MetaItem {
         path: Path::from_ident(Ident::from_str(name)),
-        node: MetaItemKind::Word,
+        kind: MetaItemKind::Word,
         span: DUMMY_SP,
     }
 }
@@ -26,7 +26,7 @@ macro_rules! dummy_meta_item_list {
     ($name:ident, [$($list:ident),* $(,)?]) => {
         MetaItem {
             path: Path::from_ident(Ident::from_str(stringify!($name))),
-            node: MetaItemKind::List(vec![
+            kind: MetaItemKind::List(vec![
                 $(
                     NestedMetaItem::MetaItem(
                         dummy_meta_item_word(stringify!($list)),
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 026a76f0894..ce214471058 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -778,11 +778,11 @@ impl Attributes {
     fn extract_cfg(mi: &ast::MetaItem) -> Option<&ast::MetaItem> {
         use syntax::ast::NestedMetaItem::MetaItem;
 
-        if let ast::MetaItemKind::List(ref nmis) = mi.node {
+        if let ast::MetaItemKind::List(ref nmis) = mi.kind {
             if nmis.len() == 1 {
                 if let MetaItem(ref cfg_mi) = nmis[0] {
                     if cfg_mi.check_name(sym::cfg) {
-                        if let ast::MetaItemKind::List(ref cfg_nmis) = cfg_mi.node {
+                        if let ast::MetaItemKind::List(ref cfg_nmis) = cfg_mi.kind {
                             if cfg_nmis.len() == 1 {
                                 if let MetaItem(ref content_mi) = cfg_nmis[0] {
                                     return Some(content_mi);
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 05ac90999af..a7f035dc9ec 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -472,7 +472,7 @@ pub enum NestedMetaItem {
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
 pub struct MetaItem {
     pub path: Path,
-    pub node: MetaItemKind,
+    pub kind: MetaItemKind,
     pub span: Span,
 }
 
diff --git a/src/libsyntax/attr/builtin.rs b/src/libsyntax/attr/builtin.rs
index ca314642d62..2a8e6b2cc95 100644
--- a/src/libsyntax/attr/builtin.rs
+++ b/src/libsyntax/attr/builtin.rs
@@ -106,7 +106,7 @@ pub fn find_unwind_attr(diagnostic: Option<&Handler>, attrs: &[Attribute]) -> Op
     attrs.iter().fold(None, |ia, attr| {
         if attr.check_name(sym::unwind) {
             if let Some(meta) = attr.meta() {
-                if let MetaItemKind::List(items) = meta.node {
+                if let MetaItemKind::List(items) = meta.kind {
                     if items.len() == 1 {
                         if items[0].check_name(sym::allowed) {
                             return Some(UnwindAttr::Allowed);
@@ -239,7 +239,7 @@ fn find_stability_generic<'a, I>(sess: &ParseSess,
             allow_const_fn_ptr = true;
         }
         // attributes with data
-        else if let Some(MetaItem { node: MetaItemKind::List(ref metas), .. }) = meta {
+        else if let Some(MetaItem { kind: MetaItemKind::List(ref metas), .. }) = meta {
             let meta = meta.as_ref().unwrap();
             let get = |meta: &MetaItem, item: &mut Option<Symbol>| {
                 if item.is_some() {
@@ -534,7 +534,7 @@ pub fn cfg_matches(cfg: &ast::MetaItem, sess: &ParseSess, features: Option<&Feat
         if cfg.path.segments.len() != 1 {
             return error(cfg.path.span, "`cfg` predicate key must be an identifier");
         }
-        match &cfg.node {
+        match &cfg.kind {
             MetaItemKind::List(..) => {
                 error(cfg.span, "unexpected parentheses after `cfg` predicate key")
             }
@@ -563,7 +563,7 @@ pub fn eval_condition<F>(cfg: &ast::MetaItem, sess: &ParseSess, eval: &mut F)
                          -> bool
     where F: FnMut(&ast::MetaItem) -> bool
 {
-    match cfg.node {
+    match cfg.kind {
         ast::MetaItemKind::List(ref mis) => {
             for mi in mis.iter() {
                 if !mi.is_meta_item() {
@@ -642,7 +642,7 @@ fn find_deprecation_generic<'a, I>(sess: &ParseSess,
         }
 
         let meta = attr.meta().unwrap();
-        depr = match &meta.node {
+        depr = match &meta.kind {
             MetaItemKind::Word => Some(Deprecation { since: None, note: None }),
             MetaItemKind::NameValue(..) => {
                 meta.value_str().map(|note| {
@@ -830,7 +830,7 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec<ReprAttr> {
                 } else {
                     if let Some(meta_item) = item.meta_item() {
                         if meta_item.check_name(sym::align) {
-                            if let MetaItemKind::NameValue(ref value) = meta_item.node {
+                            if let MetaItemKind::NameValue(ref value) = meta_item.kind {
                                 recognised = true;
                                 let mut err = struct_span_err!(diagnostic, item.span(), E0693,
                                     "incorrect `repr(align)` attribute format");
@@ -941,7 +941,7 @@ crate fn check_builtin_attribute(
                              name == sym::test || name == sym::bench;
 
     match attr.parse_meta(sess) {
-        Ok(meta) => if !should_skip(name) && !template.compatible(&meta.node) {
+        Ok(meta) => if !should_skip(name) && !template.compatible(&meta.kind) {
             let error_msg = format!("malformed `{}` attribute input", name);
             let mut msg = "attribute must be of the form ".to_owned();
             let mut suggestions = vec![];
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs
index 91bd0f29762..122cb7fb12b 100644
--- a/src/libsyntax/attr/mod.rs
+++ b/src/libsyntax/attr/mod.rs
@@ -174,7 +174,7 @@ impl Attribute {
 
     pub fn meta_item_list(&self) -> Option<Vec<NestedMetaItem>> {
         match self.meta() {
-            Some(MetaItem { node: MetaItemKind::List(list), .. }) => Some(list),
+            Some(MetaItem { kind: MetaItemKind::List(list), .. }) => Some(list),
             _ => None
         }
     }
@@ -210,14 +210,14 @@ impl MetaItem {
     //     #[attribute(name = "value")]
     //                 ^^^^^^^^^^^^^^
     pub fn name_value_literal(&self) -> Option<&Lit> {
-        match &self.node {
+        match &self.kind {
             MetaItemKind::NameValue(v) => Some(v),
             _ => None,
         }
     }
 
     pub fn value_str(&self) -> Option<Symbol> {
-        match self.node {
+        match self.kind {
             MetaItemKind::NameValue(ref v) => {
                 match v.kind {
                     LitKind::Str(ref s, _) => Some(*s),
@@ -229,14 +229,14 @@ impl MetaItem {
     }
 
     pub fn meta_item_list(&self) -> Option<&[NestedMetaItem]> {
-        match self.node {
+        match self.kind {
             MetaItemKind::List(ref l) => Some(&l[..]),
             _ => None
         }
     }
 
     pub fn is_word(&self) -> bool {
-        match self.node {
+        match self.kind {
             MetaItemKind::Word => true,
             _ => false,
         }
@@ -261,11 +261,11 @@ impl Attribute {
         let mut tokens = self.tokens.trees().peekable();
         Some(MetaItem {
             path: self.path.clone(),
-            node: if let Some(node) = MetaItemKind::from_tokens(&mut tokens) {
+            kind: if let Some(kind) = MetaItemKind::from_tokens(&mut tokens) {
                 if tokens.peek().is_some() {
                     return None;
                 }
-                node
+                kind
             } else {
                 return None;
             },
@@ -314,7 +314,7 @@ impl Attribute {
     pub fn parse_meta<'a>(&self, sess: &'a ParseSess) -> PResult<'a, MetaItem> {
         Ok(MetaItem {
             path: self.path.clone(),
-            node: self.parse(sess, |parser| parser.parse_meta_item_kind())?,
+            kind: self.parse(sess, |parser| parser.parse_meta_item_kind())?,
             span: self.span,
         })
     }
@@ -336,7 +336,7 @@ impl Attribute {
                 id: self.id,
                 style: self.style,
                 path: meta.path,
-                tokens: meta.node.tokens(meta.span),
+                tokens: meta.kind.tokens(meta.span),
                 is_sugared_doc: true,
                 span: self.span,
             })
@@ -356,15 +356,15 @@ pub fn mk_name_value_item_str(ident: Ident, str: Symbol, str_span: Span) -> Meta
 pub fn mk_name_value_item(ident: Ident, lit_kind: LitKind, lit_span: Span) -> MetaItem {
     let lit = Lit::from_lit_kind(lit_kind, lit_span);
     let span = ident.span.to(lit_span);
-    MetaItem { path: Path::from_ident(ident), span, node: MetaItemKind::NameValue(lit) }
+    MetaItem { path: Path::from_ident(ident), span, kind: MetaItemKind::NameValue(lit) }
 }
 
 pub fn mk_list_item(ident: Ident, items: Vec<NestedMetaItem>) -> MetaItem {
-    MetaItem { path: Path::from_ident(ident), span: ident.span, node: MetaItemKind::List(items) }
+    MetaItem { path: Path::from_ident(ident), span: ident.span, kind: MetaItemKind::List(items) }
 }
 
 pub fn mk_word_item(ident: Ident) -> MetaItem {
-    MetaItem { path: Path::from_ident(ident), span: ident.span, node: MetaItemKind::Word }
+    MetaItem { path: Path::from_ident(ident), span: ident.span, kind: MetaItemKind::Word }
 }
 
 pub fn mk_nested_word_item(ident: Ident) -> NestedMetaItem {
@@ -395,12 +395,12 @@ pub fn mk_attr(style: AttrStyle, path: Path, tokens: TokenStream, span: Span) ->
 
 /// Returns an inner attribute with the given value and span.
 pub fn mk_attr_inner(item: MetaItem) -> Attribute {
-    mk_attr(AttrStyle::Inner, item.path, item.node.tokens(item.span), item.span)
+    mk_attr(AttrStyle::Inner, item.path, item.kind.tokens(item.span), item.span)
 }
 
 /// Returns an outer attribute with the given value and span.
 pub fn mk_attr_outer(item: MetaItem) -> Attribute {
-    mk_attr(AttrStyle::Outer, item.path, item.node.tokens(item.span), item.span)
+    mk_attr(AttrStyle::Outer, item.path, item.kind.tokens(item.span), item.span)
 }
 
 pub fn mk_sugared_doc_attr(text: Symbol, span: Span) -> Attribute {
@@ -483,7 +483,7 @@ impl MetaItem {
             idents.push(TokenTree::Token(Token::from_ast_ident(segment.ident)).into());
             last_pos = segment.ident.span.hi();
         }
-        self.node.tokens(self.span).append_to_tree_and_joint_vec(&mut idents);
+        self.kind.tokens(self.span).append_to_tree_and_joint_vec(&mut idents);
         TokenStream::new(idents)
     }
 
@@ -531,14 +531,14 @@ impl MetaItem {
             _ => return None,
         };
         let list_closing_paren_pos = tokens.peek().map(|tt| tt.span().hi());
-        let node = MetaItemKind::from_tokens(tokens)?;
-        let hi = match node {
+        let kind = MetaItemKind::from_tokens(tokens)?;
+        let hi = match kind {
             MetaItemKind::NameValue(ref lit) => lit.span.hi(),
             MetaItemKind::List(..) => list_closing_paren_pos.unwrap_or(path.span.hi()),
             _ => path.span.hi(),
         };
         let span = path.span.with_hi(hi);
-        Some(MetaItem { path, node, span })
+        Some(MetaItem { path, kind, span })
     }
 }
 
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index aa813c03c36..02e7c6775a4 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -659,7 +659,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
                     if !item.derive_allowed() {
                         return fragment_kind.dummy(span);
                     }
-                    let meta = ast::MetaItem { node: ast::MetaItemKind::Word, span, path };
+                    let meta = ast::MetaItem { kind: ast::MetaItemKind::Word, span, path };
                     let items = expander.expand(self.cx, span, &meta, item);
                     fragment_kind.expect_from_annotatables(items)
                 }
@@ -1534,7 +1534,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
                 id: at.id,
                 style: at.style,
                 path: meta.path,
-                tokens: meta.node.tokens(meta.span),
+                tokens: meta.kind.tokens(meta.span),
                 is_sugared_doc: false,
             };
         } else {
diff --git a/src/libsyntax/mut_visit.rs b/src/libsyntax/mut_visit.rs
index ec4ab02444f..43b5df38e14 100644
--- a/src/libsyntax/mut_visit.rs
+++ b/src/libsyntax/mut_visit.rs
@@ -576,8 +576,8 @@ pub fn noop_visit_meta_list_item<T: MutVisitor>(li: &mut NestedMetaItem, vis: &m
 }
 
 pub fn noop_visit_meta_item<T: MutVisitor>(mi: &mut MetaItem, vis: &mut T) {
-    let MetaItem { path: _, node, span } = mi;
-    match node {
+    let MetaItem { path: _, kind, span } = mi;
+    match kind {
         MetaItemKind::Word => {}
         MetaItemKind::List(mis) => visit_vec(mis, |mi| vis.visit_meta_list_item(mi)),
         MetaItemKind::NameValue(_s) => {}
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index 4b2c329625b..44688bd36b5 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -179,7 +179,7 @@ impl<'a> Parser<'a> {
         };
         Ok(if let Some(meta) = meta {
             self.bump();
-            (meta.path, meta.node.tokens(meta.span))
+            (meta.path, meta.kind.tokens(meta.span))
         } else {
             let path = self.parse_path(PathStyle::Mod)?;
             let tokens = if self.check(&token::OpenDelim(DelimToken::Paren)) ||
@@ -281,9 +281,9 @@ impl<'a> Parser<'a> {
 
         let lo = self.token.span;
         let path = self.parse_path(PathStyle::Mod)?;
-        let node = self.parse_meta_item_kind()?;
+        let kind = self.parse_meta_item_kind()?;
         let span = lo.to(self.prev_span);
-        Ok(ast::MetaItem { path, node, span })
+        Ok(ast::MetaItem { path, kind, span })
     }
 
     crate fn parse_meta_item_kind(&mut self) -> PResult<'a, ast::MetaItemKind> {
diff --git a/src/libsyntax/parse/parser/path.rs b/src/libsyntax/parse/parser/path.rs
index 87839f8c70e..463ae9124ca 100644
--- a/src/libsyntax/parse/parser/path.rs
+++ b/src/libsyntax/parse/parser/path.rs
@@ -114,7 +114,7 @@ impl<'a> Parser<'a> {
     pub fn parse_path_allowing_meta(&mut self, style: PathStyle) -> PResult<'a, Path> {
         let meta_ident = match self.token.kind {
             token::Interpolated(ref nt) => match **nt {
-                token::NtMeta(ref meta) => match meta.node {
+                token::NtMeta(ref meta) => match meta.kind {
                     ast::MetaItemKind::Word => Some(meta.path.clone()),
                     _ => None,
                 },
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 3cf5e4a248c..a5792dab474 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -662,7 +662,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
 
     fn print_meta_item(&mut self, item: &ast::MetaItem) {
         self.ibox(INDENT_UNIT);
-        match item.node {
+        match item.kind {
             ast::MetaItemKind::Word => self.print_path(&item.path, false, 0),
             ast::MetaItemKind::NameValue(ref value) => {
                 self.print_path(&item.path, false, 0);