let krate_item = AstFragment::Items(smallvec![P(ast::Item {
attrs: krate.attrs,
span: krate.span,
- node: ast::ItemKind::Mod(krate.module),
+ kind: ast::ItemKind::Mod(krate.module),
ident: Ident::invalid(),
id: ast::DUMMY_NODE_ID,
vis: respan(krate.span.shrink_to_lo(), ast::VisibilityKind::Public),
})]);
match self.fully_expand_fragment(krate_item).make_items().pop().map(P::into_inner) {
- Some(ast::Item { attrs, node: ast::ItemKind::Mod(module), .. }) => {
+ Some(ast::Item { attrs, kind: ast::ItemKind::Mod(module), .. }) => {
krate.attrs = attrs;
krate.module = module;
},
fn gate_proc_macro_attr_item(&self, span: Span, item: &Annotatable) {
let (kind, gate) = match *item {
Annotatable::Item(ref item) => {
- match item.node {
+ match item.kind {
ItemKind::Mod(_) if self.cx.ecfg.proc_macro_hygiene() => return,
ItemKind::Mod(_) => ("modules", sym::proc_macro_hygiene),
_ => return,
impl<'ast, 'a> Visitor<'ast> for DisallowMacros<'a> {
fn visit_item(&mut self, i: &'ast ast::Item) {
- if let ast::ItemKind::MacroDef(_) = i.node {
+ if let ast::ItemKind::MacroDef(_) = i.kind {
emit_feature_err(
self.parse_sess,
sym::proc_macro_hygiene,
AstFragmentKind::Items, after_derive).make_items();
}
- match item.node {
+ match item.kind {
ast::ItemKind::Mac(..) => {
self.check_attributes(&item.attrs);
- item.and_then(|item| match item.node {
+ item.and_then(|item| match item.kind {
ItemKind::Mac(mac) => self.collect(
AstFragmentKind::Items, InvocationKind::Bang { mac, span: item.span }
).make_items(),