Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisa

Nix `rustc_hir` reexports in rustc::hir

r? @Zoxc cc @Mark-Simulacrum
This commit is contained in:
bors 2020-01-06 12:55:40 +00:00
commit ebbb2bf37a
345 changed files with 949 additions and 911 deletions

View file

@ -23,6 +23,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" }
rustc_feature = { path = "../librustc_feature" }
rustc_fs_util = { path = "../librustc_fs_util" }
rustc_hir = { path = "../librustc_hir" }
rustc_incremental = { path = "../librustc_incremental" }
rustc_index = { path = "../librustc_index" }
rustc_llvm = { path = "../librustc_llvm" }

View file

@ -4,10 +4,10 @@ use crate::llvm;
use crate::type_of::LayoutLlvmExt;
use crate::value::Value;
use rustc::hir;
use rustc_codegen_ssa::mir::operand::OperandValue;
use rustc_codegen_ssa::mir::place::PlaceRef;
use rustc_codegen_ssa::traits::*;
use rustc_hir as hir;
use rustc_span::Span;
use libc::{c_char, c_uint};

View file

@ -2,7 +2,6 @@
use std::ffi::CString;
use rustc::hir::def_id::{DefId, LOCAL_CRATE};
use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags;
use rustc::session::config::{OptLevel, Sanitizer};
use rustc::session::Session;
@ -13,6 +12,7 @@ use rustc_codegen_ssa::traits::*;
use rustc_data_structures::const_cstr;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::small_c_str::SmallCStr;
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
use rustc_target::abi::call::Conv;
use rustc_target::spec::PanicStrategy;

View file

@ -8,7 +8,6 @@ use crate::{LlvmCodegenBackend, ModuleLlvm};
use log::{debug, info};
use rustc::bug;
use rustc::dep_graph::WorkProduct;
use rustc::hir::def_id::LOCAL_CRATE;
use rustc::middle::exported_symbols::SymbolExportLevel;
use rustc::session::config::{self, Lto};
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule, ThinShared};
@ -18,6 +17,7 @@ use rustc_codegen_ssa::traits::*;
use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, RLIB_BYTECODE_EXTENSION};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::{FatalError, Handler};
use rustc_hir::def_id::LOCAL_CRATE;
use rustc_session::cgu_reuse_tracker::CguReuse;
use std::ffi::{CStr, CString};

View file

@ -12,7 +12,6 @@ use crate::LlvmCodegenBackend;
use crate::ModuleLlvm;
use log::debug;
use rustc::bug;
use rustc::hir::def_id::LOCAL_CRATE;
use rustc::session::config::{self, Lto, OutputType, Passes, Sanitizer, SwitchWithOptPath};
use rustc::session::Session;
use rustc::ty::TyCtxt;
@ -22,6 +21,7 @@ use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, RLIB_BYTECODE_EXTENSION};
use rustc_data_structures::small_c_str::SmallCStr;
use rustc_errors::{FatalError, Handler};
use rustc_fs_util::{link_or_copy, path_to_c_string};
use rustc_hir::def_id::LOCAL_CRATE;
use libc::{c_char, c_int, c_uint, c_void, size_t};
use std::ffi::CString;

View file

@ -7,7 +7,6 @@ use crate::type_of::LayoutLlvmExt;
use crate::value::Value;
use libc::{c_char, c_uint};
use log::debug;
use rustc::hir::def_id::DefId;
use rustc::session::config;
use rustc::ty::layout::{self, Align, Size, TyLayout};
use rustc::ty::{self, Ty, TyCtxt};
@ -19,6 +18,7 @@ use rustc_codegen_ssa::traits::*;
use rustc_codegen_ssa::MemFlags;
use rustc_data_structures::const_cstr;
use rustc_data_structures::small_c_str::SmallCStr;
use rustc_hir::def_id::DefId;
use rustc_target::spec::{HasTargetSpec, Target};
use std::borrow::Cow;
use std::ffi::CStr;

View file

@ -7,8 +7,6 @@ use crate::type_of::LayoutLlvmExt;
use crate::value::Value;
use libc::c_uint;
use log::debug;
use rustc::hir::def_id::DefId;
use rustc::hir::{self, Node};
use rustc::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
use rustc::mir::interpret::{read_target_uint, Allocation, ConstValue, ErrorHandled, Pointer};
use rustc::mir::mono::MonoItem;
@ -16,6 +14,9 @@ use rustc::ty::layout::{self, Align, LayoutOf, Size};
use rustc::ty::{self, Instance, Ty};
use rustc::{bug, span_bug};
use rustc_codegen_ssa::traits::*;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_hir::Node;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use rustc_target::abi::HasDataLayout;

View file

@ -5,7 +5,6 @@ use crate::llvm;
use crate::llvm_util;
use crate::value::Value;
use rustc::dep_graph::DepGraphSafe;
use rustc::hir;
use crate::type_::Type;
use rustc_codegen_ssa::traits::*;
@ -24,6 +23,7 @@ use rustc_data_structures::base_n;
use rustc_data_structures::const_cstr;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::small_c_str::SmallCStr;
use rustc_hir::Unsafety;
use rustc_target::spec::{HasTargetSpec, Target};
use crate::abi::Abi;
@ -415,7 +415,7 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
iter::once(tcx.mk_mut_ptr(tcx.types.u8)),
tcx.types.never,
false,
hir::Unsafety::Unsafe,
Unsafety::Unsafe,
Abi::C,
));

View file

@ -20,8 +20,6 @@ use crate::llvm_util;
use crate::value::Value;
use log::debug;
use rustc::hir::def::CtorKind;
use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc::ich::NodeIdHashingMode;
use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags;
use rustc::mir::interpret::truncate;
@ -41,6 +39,8 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::small_c_str::SmallCStr;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_fs_util::path_to_c_string;
use rustc_hir::def::CtorKind;
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc_index::vec::{Idx, IndexVec};
use rustc_span::symbol::{Interner, Symbol};
use rustc_span::{self, FileName, Span};

View file

@ -13,9 +13,9 @@ use crate::llvm;
use crate::llvm::debuginfo::{
DIArray, DIBuilder, DIFile, DIFlags, DILexicalBlock, DISPFlags, DIScope, DIType,
};
use rustc::hir::def_id::{CrateNum, DefId, DefIdMap, LOCAL_CRATE};
use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags;
use rustc::ty::subst::{GenericArgKind, SubstsRef};
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LOCAL_CRATE};
use crate::abi::FnAbi;
use crate::builder::Builder;

View file

@ -7,8 +7,8 @@ use rustc::ty::{self, Instance};
use crate::common::CodegenCx;
use crate::llvm;
use crate::llvm::debuginfo::DIScope;
use rustc::hir::def_id::DefId;
use rustc::hir::map::DefPathData;
use rustc_hir::def_id::DefId;
use rustc_data_structures::small_c_str::SmallCStr;

View file

@ -3,8 +3,8 @@
use super::namespace::item_namespace;
use super::CrateDebugContext;
use rustc::hir::def_id::DefId;
use rustc::ty::DefIdTree;
use rustc_hir::def_id::DefId;
use crate::common::CodegenCx;
use crate::llvm;

View file

@ -7,7 +7,6 @@ use crate::type_::Type;
use crate::type_of::LayoutLlvmExt;
use crate::va_arg::emit_va_arg;
use crate::value::Value;
use rustc::hir;
use rustc::ty::layout::{self, FnAbiExt, HasTyCtxt, LayoutOf, Primitive};
use rustc::ty::{self, Ty};
use rustc::{bug, span_bug};
@ -17,6 +16,7 @@ use rustc_codegen_ssa::glue;
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
use rustc_codegen_ssa::mir::place::PlaceRef;
use rustc_codegen_ssa::MemFlags;
use rustc_hir as hir;
use rustc_target::abi::HasDataLayout;
use syntax::ast;

View file

@ -5,11 +5,11 @@ use crate::context::CodegenCx;
use crate::llvm;
use crate::type_of::LayoutLlvmExt;
use log::debug;
use rustc::hir::def_id::{DefId, LOCAL_CRATE};
use rustc::mir::mono::{Linkage, Visibility};
use rustc::ty::layout::{FnAbiExt, LayoutOf};
use rustc::ty::{Instance, TypeFoldable};
use rustc_codegen_ssa::traits::*;
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
pub use rustc::mir::mono::MonoItem;