From 7bc94cc3c2ccef8b4d393910bb978a6487db1202 Mon Sep 17 00:00:00 2001 From: varkor Date: Thu, 26 Sep 2019 17:51:36 +0100 Subject: Rename `Item.node` to `Item.kind` --- src/libsyntax/parse/diagnostics.rs | 2 +- src/libsyntax/parse/parser/item.rs | 4 ++-- src/libsyntax/parse/tests.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/diagnostics.rs b/src/libsyntax/parse/diagnostics.rs index 62cb836e31e..ec5d00e0952 100644 --- a/src/libsyntax/parse/diagnostics.rs +++ b/src/libsyntax/parse/diagnostics.rs @@ -761,7 +761,7 @@ impl<'a> Parser<'a> { ); if !items.is_empty() { let previous_item = &items[items.len() - 1]; - let previous_item_kind_name = match previous_item.node { + let previous_item_kind_name = match previous_item.kind { // Say "braced struct" because tuple-structs and // braceless-empty-struct declarations do take a semicolon. ItemKind::Struct(..) => Some("braced struct"), diff --git a/src/libsyntax/parse/parser/item.rs b/src/libsyntax/parse/parser/item.rs index 27b0325db12..83721a2866a 100644 --- a/src/libsyntax/parse/parser/item.rs +++ b/src/libsyntax/parse/parser/item.rs @@ -1949,13 +1949,13 @@ impl<'a> Parser<'a> { } } - fn mk_item(&self, span: Span, ident: Ident, node: ItemKind, vis: Visibility, + fn mk_item(&self, span: Span, ident: Ident, kind: ItemKind, vis: Visibility, attrs: Vec) -> P { P(Item { ident, attrs, id: DUMMY_NODE_ID, - node, + kind, vis, span, tokens: None, diff --git a/src/libsyntax/parse/tests.rs b/src/libsyntax/parse/tests.rs index 7b714858850..3bdb9227b4e 100644 --- a/src/libsyntax/parse/tests.rs +++ b/src/libsyntax/parse/tests.rs @@ -299,7 +299,7 @@ fn out_of_line_mod() { &sess, ).unwrap().unwrap(); - if let ast::ItemKind::Mod(ref m) = item.node { + if let ast::ItemKind::Mod(ref m) = item.kind { assert!(m.items.len() == 2); } else { panic!(); -- cgit 1.4.1-3-g733a5