From e2a1cce9c558fe84ef5a2b8e3b07f1ee1521694a Mon Sep 17 00:00:00 2001 From: varkor Date: Sat, 25 Aug 2018 15:56:16 +0100 Subject: Rename hir::map::NodeKind to hir::Node --- src/librustc_codegen_llvm/back/symbol_export.rs | 10 +++++----- src/librustc_codegen_llvm/consts.rs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/back/symbol_export.rs b/src/librustc_codegen_llvm/back/symbol_export.rs index dd687890ff1..6b1b0b94fd9 100644 --- a/src/librustc_codegen_llvm/back/symbol_export.rs +++ b/src/librustc_codegen_llvm/back/symbol_export.rs @@ -13,7 +13,7 @@ use std::sync::Arc; use monomorphize::Instance; use rustc::hir; -use rustc::hir::map::NodeKind; +use rustc::hir::Node; use rustc::hir::CodegenFnAttrFlags; use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE, CRATE_DEF_INDEX}; use rustc_data_structures::fingerprint::Fingerprint; @@ -95,7 +95,7 @@ fn reachable_non_generics_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, // As a result, if this id is an FFI item (foreign item) then we only // let it through if it's included statically. match tcx.hir.get(node_id) { - NodeKind::ForeignItem(..) => { + Node::ForeignItem(..) => { let def_id = tcx.hir.local_def_id(node_id); if tcx.is_statically_included_foreign_item(def_id) { Some(def_id) @@ -105,14 +105,14 @@ fn reachable_non_generics_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, } // Only consider nodes that actually have exported symbols. - NodeKind::Item(&hir::Item { + Node::Item(&hir::Item { node: hir::ItemKind::Static(..), .. }) | - NodeKind::Item(&hir::Item { + Node::Item(&hir::Item { node: hir::ItemKind::Fn(..), .. }) | - NodeKind::ImplItem(&hir::ImplItem { + Node::ImplItem(&hir::ImplItem { node: hir::ImplItemKind::Method(..), .. }) => { diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index 921d70e7118..522de2f15e0 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -11,7 +11,7 @@ use libc::c_uint; use llvm::{self, SetUnnamedAddr, True}; use rustc::hir::def_id::DefId; -use rustc::hir::map::NodeKind; +use rustc::hir::Node; use debuginfo; use base; use monomorphize::MonoItem; @@ -135,7 +135,7 @@ pub fn get_static(cx: &CodegenCx<'ll, '_>, def_id: DefId) -> &'ll Value { let llty = cx.layout_of(ty).llvm_type(cx); let (g, attrs) = match cx.tcx.hir.get(id) { - NodeKind::Item(&hir::Item { + Node::Item(&hir::Item { ref attrs, span, node: hir::ItemKind::Static(..), .. }) => { if declare::get_declared_value(cx, &sym[..]).is_some() { @@ -153,7 +153,7 @@ pub fn get_static(cx: &CodegenCx<'ll, '_>, def_id: DefId) -> &'ll Value { (g, attrs) } - NodeKind::ForeignItem(&hir::ForeignItem { + Node::ForeignItem(&hir::ForeignItem { ref attrs, span, node: hir::ForeignItemKind::Static(..), .. }) => { let fn_attrs = cx.tcx.codegen_fn_attrs(def_id); -- cgit 1.4.1-3-g733a5