rustc -> rustc_middle part 3 (rustfmt)
This commit is contained in:
parent
0cb9e36090
commit
1ccb0b4a02
297 changed files with 773 additions and 741 deletions
|
@ -5,13 +5,13 @@ use crate::type_::Type;
|
|||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::layout::{self};
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_codegen_ssa::mir::operand::OperandValue;
|
||||
use rustc_codegen_ssa::mir::place::PlaceRef;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_codegen_ssa::MemFlags;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::layout::{self};
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_target::abi::call::ArgAbi;
|
||||
use rustc_target::abi::{HasDataLayout, LayoutOf};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::attributes;
|
||||
use libc::c_uint;
|
||||
use rustc_ast::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_ast::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS};
|
||||
|
||||
use crate::llvm::{self, False, True};
|
||||
use crate::ModuleLlvm;
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
use std::ffi::CString;
|
||||
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
|
||||
use rustc_middle::ty::layout::HasTyCtxt;
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
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_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
|
||||
use rustc_middle::ty::layout::HasTyCtxt;
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_session::config::{OptLevel, Sanitizer};
|
||||
use rustc_session::Session;
|
||||
use rustc_target::abi::call::Conv;
|
||||
|
|
|
@ -6,9 +6,6 @@ use crate::llvm::archive_ro::ArchiveRO;
|
|||
use crate::llvm::{self, False, True};
|
||||
use crate::{LlvmCodegenBackend, ModuleLlvm};
|
||||
use log::{debug, info};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::dep_graph::WorkProduct;
|
||||
use rustc_middle::middle::exported_symbols::SymbolExportLevel;
|
||||
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule, ThinShared};
|
||||
use rustc_codegen_ssa::back::symbol_export;
|
||||
use rustc_codegen_ssa::back::write::{CodegenContext, FatLTOInput, ModuleConfig};
|
||||
|
@ -17,6 +14,9 @@ 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_middle::bug;
|
||||
use rustc_middle::dep_graph::WorkProduct;
|
||||
use rustc_middle::middle::exported_symbols::SymbolExportLevel;
|
||||
use rustc_session::cgu_reuse_tracker::CguReuse;
|
||||
use rustc_session::config::{self, Lto};
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ use crate::type_::Type;
|
|||
use crate::LlvmCodegenBackend;
|
||||
use crate::ModuleLlvm;
|
||||
use log::debug;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, ModuleConfig};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, RLIB_BYTECODE_EXTENSION};
|
||||
|
@ -23,6 +21,8 @@ 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 rustc_middle::bug;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::config::{self, Lto, OutputType, Passes, Sanitizer, SwitchWithOptPath};
|
||||
use rustc_session::Session;
|
||||
|
||||
|
|
|
@ -23,17 +23,17 @@ use crate::llvm;
|
|||
use crate::metadata;
|
||||
use crate::value::Value;
|
||||
|
||||
use rustc_codegen_ssa::base::maybe_create_entry_wrapper;
|
||||
use rustc_codegen_ssa::mono_item::MonoItemExt;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_codegen_ssa::{ModuleCodegen, ModuleKind};
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use rustc_middle::dep_graph;
|
||||
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
|
||||
use rustc_middle::middle::cstore::EncodedMetadata;
|
||||
use rustc_middle::middle::exported_symbols;
|
||||
use rustc_middle::mir::mono::{Linkage, Visibility};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_codegen_ssa::base::maybe_create_entry_wrapper;
|
||||
use rustc_codegen_ssa::mono_item::MonoItemExt;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_codegen_ssa::{ModuleCodegen, ModuleKind};
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use rustc_session::config::DebugInfo;
|
||||
use rustc_span::symbol::Symbol;
|
||||
|
||||
|
|
|
@ -7,16 +7,18 @@ use crate::type_of::LayoutLlvmExt;
|
|||
use crate::value::Value;
|
||||
use libc::c_uint;
|
||||
use log::debug;
|
||||
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
|
||||
use rustc_middle::mir::interpret::{read_target_uint, Allocation, ConstValue, ErrorHandled, Pointer};
|
||||
use rustc_middle::mir::mono::MonoItem;
|
||||
use rustc_middle::ty::layout::{self, Align, LayoutOf, Size};
|
||||
use rustc_middle::ty::{self, Instance, Ty};
|
||||
use rustc_middle::{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_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
|
||||
use rustc_middle::mir::interpret::{
|
||||
read_target_uint, Allocation, ConstValue, ErrorHandled, Pointer,
|
||||
};
|
||||
use rustc_middle::mir::mono::MonoItem;
|
||||
use rustc_middle::ty::layout::{self, Align, LayoutOf, Size};
|
||||
use rustc_middle::ty::{self, Instance, Ty};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::HasDataLayout;
|
||||
|
|
|
@ -5,8 +5,8 @@ use crate::llvm;
|
|||
use crate::builder::Builder;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::value::Value;
|
||||
use rustc_middle::bug;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_middle::bug;
|
||||
use rustc_session::config::DebugInfo;
|
||||
|
||||
use rustc_ast::attr;
|
||||
|
|
|
@ -12,28 +12,28 @@ use crate::llvm;
|
|||
use crate::llvm::debuginfo::{
|
||||
DIArray, DIBuilder, DIFile, DIFlags, DILexicalBlock, DISPFlags, DIScope, DIType, DIVariable,
|
||||
};
|
||||
use rustc_middle::ty::subst::{GenericArgKind, SubstsRef};
|
||||
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LOCAL_CRATE};
|
||||
use rustc_middle::ty::subst::{GenericArgKind, SubstsRef};
|
||||
|
||||
use crate::abi::FnAbi;
|
||||
use crate::builder::Builder;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::value::Value;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::{self, Instance, ParamEnv, Ty};
|
||||
use rustc_codegen_ssa::debuginfo::type_names;
|
||||
use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::{self, Instance, ParamEnv, Ty};
|
||||
use rustc_session::config::{self, DebugInfo};
|
||||
|
||||
use libc::c_uint;
|
||||
use log::debug;
|
||||
use std::cell::RefCell;
|
||||
|
||||
use rustc_middle::ty::layout::{self, HasTyCtxt, LayoutOf, Size};
|
||||
use rustc_ast::ast;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_middle::ty::layout::{self, HasTyCtxt, LayoutOf, Size};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{self, BytePos, Span};
|
||||
use smallvec::SmallVec;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
use super::namespace::item_namespace;
|
||||
use super::CrateDebugContext;
|
||||
|
||||
use rustc_middle::ty::DefIdTree;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::DefIdTree;
|
||||
|
||||
use crate::common::CodegenCx;
|
||||
use crate::llvm;
|
||||
|
|
|
@ -19,8 +19,8 @@ use crate::llvm::AttributePlace::Function;
|
|||
use crate::type_::Type;
|
||||
use crate::value::Value;
|
||||
use log::debug;
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_middle::ty::Ty;
|
||||
|
||||
/// Declare a function.
|
||||
///
|
||||
|
|
|
@ -17,10 +17,6 @@
|
|||
use back::write::{create_informational_target_machine, create_target_machine};
|
||||
|
||||
pub use llvm_util::target_features;
|
||||
use rustc_middle::dep_graph::{DepGraph, WorkProduct};
|
||||
use rustc_middle::middle::cstore::{EncodedMetadata, MetadataLoaderDyn};
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule};
|
||||
use rustc_codegen_ssa::back::write::{CodegenContext, FatLTOInput, ModuleConfig};
|
||||
|
@ -28,6 +24,10 @@ use rustc_codegen_ssa::traits::*;
|
|||
use rustc_codegen_ssa::ModuleCodegen;
|
||||
use rustc_codegen_ssa::{CodegenResults, CompiledModule};
|
||||
use rustc_errors::{FatalError, Handler};
|
||||
use rustc_middle::dep_graph::{DepGraph, WorkProduct};
|
||||
use rustc_middle::middle::cstore::{EncodedMetadata, MetadataLoaderDyn};
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_serialize::json;
|
||||
use rustc_session::config::{self, OptLevel, OutputFilenames, PrintRequest};
|
||||
use rustc_session::Session;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::back::write::create_informational_target_machine;
|
||||
use crate::llvm;
|
||||
use libc::c_int;
|
||||
use rustc_middle::bug;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_feature::UnstableFeatures;
|
||||
use rustc_middle::bug;
|
||||
use rustc_session::config::PrintRequest;
|
||||
use rustc_session::Session;
|
||||
use rustc_span::symbol::sym;
|
||||
|
|
|
@ -5,11 +5,11 @@ use crate::context::CodegenCx;
|
|||
use crate::llvm;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use log::debug;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
||||
use rustc_middle::mir::mono::{Linkage, Visibility};
|
||||
use rustc_middle::ty::layout::{FnAbiExt, LayoutOf};
|
||||
use rustc_middle::ty::{Instance, TypeFoldable};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
||||
|
||||
pub use rustc_middle::mir::mono::MonoItem;
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::llvm;
|
|||
use crate::llvm::{Bool, False, True};
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_codegen_ssa::common::TypeKind;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
|
|
|
@ -2,12 +2,12 @@ use crate::builder::Builder;
|
|||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use rustc_middle::ty::layout::{Align, HasDataLayout, HasTyCtxt, LayoutOf, Size};
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_codegen_ssa::mir::operand::OperandRef;
|
||||
use rustc_codegen_ssa::traits::{
|
||||
BaseTypeMethods, BuilderMethods, ConstMethods, DerivedTypeMethods,
|
||||
};
|
||||
use rustc_middle::ty::layout::{Align, HasDataLayout, HasTyCtxt, LayoutOf, Size};
|
||||
use rustc_middle::ty::Ty;
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn round_pointer_up_to_alignment(
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use rustc_middle::middle::cstore::{EncodedMetadata, LibSource, NativeLibrary, NativeLibraryKind};
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_fs_util::fix_windows_verbatim_for_gcc;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_middle::middle::cstore::{EncodedMetadata, LibSource, NativeLibrary, NativeLibraryKind};
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
use rustc_session::config::{
|
||||
self, CFGuard, DebugInfo, OutputFilenames, OutputType, PrintRequest, Sanitizer,
|
||||
};
|
||||
|
|
|
@ -8,10 +8,10 @@ use std::io::prelude::*;
|
|||
use std::io::{self, BufWriter};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_serialize::{json, Encoder};
|
||||
use rustc_session::config::{self, CrateType, DebugInfo, LinkerPluginLto, Lto, OptLevel};
|
||||
use rustc_session::Session;
|
||||
|
|
|
@ -3,8 +3,8 @@ use std::env;
|
|||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use rustc_middle::middle::cstore::LibSource;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_middle::middle::cstore::LibSource;
|
||||
|
||||
pub struct RPathConfig<'a> {
|
||||
pub used_crates: &'a [(CrateNum, LibSource)],
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
use std::collections::hash_map::Entry::*;
|
||||
use std::sync::Arc;
|
||||
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
|
||||
use rustc_middle::middle::exported_symbols::{metadata_symbol_name, ExportedSymbol, SymbolExportLevel};
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::subst::{GenericArgKind, SubstsRef};
|
||||
use rustc_middle::ty::Instance;
|
||||
use rustc_middle::ty::{SymbolName, TyCtxt};
|
||||
use rustc_ast::expand::allocator::ALLOCATOR_METHODS;
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
|
@ -14,6 +8,14 @@ use rustc_hir as hir;
|
|||
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, CRATE_DEF_INDEX, LOCAL_CRATE};
|
||||
use rustc_hir::Node;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
|
||||
use rustc_middle::middle::exported_symbols::{
|
||||
metadata_symbol_name, ExportedSymbol, SymbolExportLevel,
|
||||
};
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::subst::{GenericArgKind, SubstsRef};
|
||||
use rustc_middle::ty::Instance;
|
||||
use rustc_middle::ty::{SymbolName, TyCtxt};
|
||||
use rustc_session::config::{self, Sanitizer};
|
||||
|
||||
pub fn threshold(tcx: TyCtxt<'_>) -> SymbolExportLevel {
|
||||
|
|
|
@ -10,10 +10,6 @@ use crate::{
|
|||
|
||||
use crate::traits::*;
|
||||
use jobserver::{Acquired, Client};
|
||||
use rustc_middle::dep_graph::{WorkProduct, WorkProductFileKind, WorkProductId};
|
||||
use rustc_middle::middle::cstore::EncodedMetadata;
|
||||
use rustc_middle::middle::exported_symbols::SymbolExportLevel;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_ast::attr;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::profiling::SelfProfilerRef;
|
||||
|
@ -28,6 +24,10 @@ use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
|
|||
use rustc_incremental::{
|
||||
copy_cgu_workproducts_to_incr_comp_cache_dir, in_incr_comp_dir, in_incr_comp_dir_sess,
|
||||
};
|
||||
use rustc_middle::dep_graph::{WorkProduct, WorkProductFileKind, WorkProductId};
|
||||
use rustc_middle::middle::cstore::EncodedMetadata;
|
||||
use rustc_middle::middle::exported_symbols::SymbolExportLevel;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::cgu_reuse_tracker::CguReuseTracker;
|
||||
use rustc_session::config::{
|
||||
self, Lto, OutputFilenames, OutputType, Passes, Sanitizer, SwitchWithOptPath,
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#![allow(non_camel_case_types, non_snake_case)]
|
||||
|
||||
use rustc_middle::ty::{Ty, TyCtxt};
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_middle::ty::{Ty, TyCtxt};
|
||||
use rustc_session::Session;
|
||||
use rustc_span::Span;
|
||||
|
||||
use crate::base;
|
||||
use crate::traits::*;
|
||||
use rustc_middle::middle::lang_items::LangItem;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::middle::lang_items::LangItem;
|
||||
|
||||
use crate::traits::BuilderMethods;
|
||||
use rustc_hir as hir;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// Type Names for Debug Info.
|
||||
|
||||
use rustc_middle::ty::{self, subst::SubstsRef, Ty, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::{self, subst::SubstsRef, Ty, TyCtxt};
|
||||
|
||||
// Compute the name of the type as it should be stored in debuginfo. Does not do
|
||||
// any caching, i.e., calling the function twice with the same type will also do
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
use super::FunctionCx;
|
||||
use crate::traits::*;
|
||||
use rustc_data_structures::graph::dominators::Dominators;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_middle::mir::traversal;
|
||||
use rustc_middle::mir::visit::{
|
||||
MutatingUseContext, NonMutatingUseContext, NonUseContext, PlaceContext, Visitor,
|
||||
|
@ -10,9 +13,6 @@ use rustc_middle::mir::visit::{
|
|||
use rustc_middle::mir::{self, Location, TerminatorKind};
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
|
||||
use rustc_data_structures::graph::dominators::Dominators;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
|
||||
pub fn non_ssa_locals<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
||||
fx: &FunctionCx<'a, 'tcx, Bx>,
|
||||
|
|
|
@ -9,12 +9,12 @@ use crate::meth;
|
|||
use crate::traits::*;
|
||||
use crate::MemFlags;
|
||||
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_middle::middle::lang_items;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::mir::AssertKind;
|
||||
use rustc_middle::ty::layout::{self, FnAbiExt, HasTyCtxt, LayoutOf};
|
||||
use rustc_middle::ty::{self, Instance, Ty, TypeFoldable};
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_span::{source_map::Span, symbol::Symbol};
|
||||
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::mir::operand::OperandRef;
|
||||
use crate::traits::*;
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::mir::interpret::{ConstValue, ErrorHandled};
|
||||
use rustc_middle::ty::layout::{self, HasTyCtxt};
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
use super::FunctionCx;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::traits::*;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::layout::{LayoutOf, Size};
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_session::config::DebugInfo;
|
||||
|
||||
use rustc_span::symbol::{kw, Symbol};
|
||||
|
|
|
@ -7,12 +7,12 @@ use crate::common::{self, IntPredicate, RealPredicate};
|
|||
use crate::traits::*;
|
||||
use crate::MemFlags;
|
||||
|
||||
use rustc_apfloat::{ieee, Float, Round, Status};
|
||||
use rustc_middle::middle::lang_items::ExchangeMallocFnLangItem;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::cast::{CastTy, IntTy};
|
||||
use rustc_middle::ty::layout::{self, HasTyCtxt, LayoutOf};
|
||||
use rustc_middle::ty::{self, adjustment::PointerCast, Instance, Ty, TyCtxt};
|
||||
use rustc_apfloat::{ieee, Float, Round, Status};
|
||||
use rustc_span::source_map::{Span, DUMMY_SP};
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use rustc_middle::mir;
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_middle::mir;
|
||||
|
||||
use super::FunctionCx;
|
||||
use super::LocalRef;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::base;
|
||||
use crate::traits::*;
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::mir::mono::{Linkage, Visibility};
|
||||
use rustc_middle::ty::layout::HasTyCtxt;
|
||||
use rustc_hir as hir;
|
||||
|
||||
use rustc_middle::mir::mono::MonoItem;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use super::BackendTypes;
|
||||
use crate::mir::debuginfo::{FunctionDebugContext, VariableKind};
|
||||
use rustc_ast::ast::Name;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::layout::Size;
|
||||
use rustc_middle::ty::{Instance, Ty};
|
||||
use rustc_ast::ast::Name;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_span::{SourceFile, Span};
|
||||
use rustc_target::abi::call::FnAbi;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use super::BackendTypes;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::mir::mono::{Linkage, Visibility};
|
||||
use rustc_middle::ty::{Instance, Ty};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_target::abi::call::FnAbi;
|
||||
|
||||
pub trait DeclareMethods<'tcx>: BackendTypes {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use super::BackendTypes;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_middle::mir::mono::CodegenUnit;
|
||||
use rustc_middle::ty::{self, Instance, Ty};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_session::Session;
|
||||
use std::cell::RefCell;
|
||||
use std::sync::Arc;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use super::BackendTypes;
|
||||
use rustc_middle::ty::layout::Align;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::layout::Align;
|
||||
|
||||
pub trait StaticMethods: BackendTypes {
|
||||
fn static_addr_of(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
|
||||
|
|
|
@ -2,8 +2,8 @@ use crate::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule};
|
|||
use crate::back::write::{CodegenContext, FatLTOInput, ModuleConfig};
|
||||
use crate::{CompiledModule, ModuleCodegen};
|
||||
|
||||
use rustc_middle::dep_graph::WorkProduct;
|
||||
use rustc_errors::{FatalError, Handler};
|
||||
use rustc_middle::dep_graph::WorkProduct;
|
||||
|
||||
pub trait WriteBackendMethods: 'static + Sized + Clone {
|
||||
type Module: Send + Sync;
|
||||
|
|
|
@ -18,9 +18,6 @@ extern crate lazy_static;
|
|||
|
||||
pub extern crate rustc_plugin_impl as plugin;
|
||||
|
||||
use rustc_middle::middle::cstore::MetadataLoader;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_ast::ast;
|
||||
use rustc_codegen_ssa::{traits::CodegenBackend, CodegenResults};
|
||||
use rustc_data_structures::profiling::print_time_passes_entry;
|
||||
|
@ -35,6 +32,9 @@ use rustc_interface::util::{collect_crate_types, get_builtin_codegen_backend};
|
|||
use rustc_interface::{interface, Queries};
|
||||
use rustc_lint::LintStore;
|
||||
use rustc_metadata::locator;
|
||||
use rustc_middle::middle::cstore::MetadataLoader;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_save_analysis as save;
|
||||
use rustc_save_analysis::DumpHandler;
|
||||
use rustc_serialize::json::{self, ToJson};
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
//! The various pretty-printing routines.
|
||||
|
||||
use rustc_middle::hir::map as hir_map;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::LOCAL_CRATE;
|
||||
use rustc_hir_pretty as pprust_hir;
|
||||
use rustc_middle::hir::map as hir_map;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_mir::util::{write_mir_graphviz, write_mir_pretty};
|
||||
use rustc_session::config::{Input, PpMode, PpSourceMode};
|
||||
use rustc_session::Session;
|
||||
|
|
|
@ -34,16 +34,16 @@
|
|||
//! ```
|
||||
|
||||
use graphviz as dot;
|
||||
use rustc_middle::dep_graph::debug::{DepNodeFilter, EdgeFilter};
|
||||
use rustc_middle::dep_graph::{DepGraphQuery, DepKind, DepNode, DepNodeExt};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_ast::ast;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::graph::implementation::{Direction, NodeIndex, INCOMING, OUTGOING};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
|
||||
use rustc_middle::dep_graph::debug::{DepNodeFilter, EdgeFilter};
|
||||
use rustc_middle::dep_graph::{DepGraphQuery, DepKind, DepNode, DepNodeExt};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
//! allows for doing a more fine-grained check to see if pre- or post-lto data
|
||||
//! was re-used.
|
||||
|
||||
use rustc_middle::mir::mono::CodegenUnitNameBuilder;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_ast::ast;
|
||||
use rustc_hir::def_id::LOCAL_CRATE;
|
||||
use rustc_middle::mir::mono::CodegenUnitNameBuilder;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::cgu_reuse_tracker::*;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use std::collections::BTreeSet;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
//! Code to save/load the dep-graph from files.
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_middle::dep_graph::{PreviousDepGraph, SerializedDepGraph, WorkProduct, WorkProductId};
|
||||
use rustc_middle::ty::query::OnDiskCache;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_serialize::opaque::Decoder;
|
||||
use rustc_serialize::Decodable as RustcDecodable;
|
||||
use rustc_session::Session;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_middle::dep_graph::{DepGraph, DepKind, WorkProduct, WorkProductId};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::sync::join;
|
||||
use rustc_middle::dep_graph::{DepGraph, DepKind, WorkProduct, WorkProductId};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_serialize::opaque::Encoder;
|
||||
use rustc_serialize::Encodable as RustcEncodable;
|
||||
use rustc_session::Session;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//! This module contains files for saving intermediate work-products.
|
||||
|
||||
use crate::persist::fs::*;
|
||||
use rustc_middle::dep_graph::{WorkProduct, WorkProductFileKind, WorkProductId};
|
||||
use rustc_fs_util::link_or_copy;
|
||||
use rustc_middle::dep_graph::{WorkProduct, WorkProductFileKind, WorkProductId};
|
||||
use rustc_session::Session;
|
||||
use std::fs as std_fs;
|
||||
use std::path::PathBuf;
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
|
||||
use crate::infer::{ConstVariableOrigin, ConstVariableOriginKind};
|
||||
use crate::infer::{InferCtxt, RegionVariableOrigin, TypeVariableOrigin, TypeVariableOriginKind};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::subst::GenericArg;
|
||||
use rustc_middle::ty::{self, BoundVar, List};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
pub use rustc_middle::infer::canonical::*;
|
||||
|
|
|
@ -18,14 +18,14 @@ use crate::infer::{InferCtxt, InferOk, InferResult, NLLRegionVariableOrigin};
|
|||
use crate::traits::query::{Fallible, NoSolution};
|
||||
use crate::traits::{DomainGoal, TraitEngine};
|
||||
use crate::traits::{Obligation, ObligationCause, PredicateObligation};
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::arena::ArenaAllocatable;
|
||||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::relate::TypeRelation;
|
||||
use rustc_middle::ty::subst::{GenericArg, GenericArgKind};
|
||||
use rustc_middle::ty::{self, BoundVar, Ty, TyCtxt};
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use std::fmt::Debug;
|
||||
|
||||
impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
|
||||
|
|
|
@ -34,13 +34,13 @@ use super::{InferCtxt, MiscVariable, TypeTrace};
|
|||
|
||||
use crate::traits::{Obligation, PredicateObligations};
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::error::TypeError;
|
||||
use rustc_middle::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use rustc_middle::ty::subst::SubstsRef;
|
||||
use rustc_middle::ty::{self, InferConst, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{IntType, UintType};
|
||||
use rustc_ast::ast;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -55,6 +55,12 @@ use crate::traits::{
|
|||
IfExpressionCause, MatchExpressionArmCause, ObligationCause, ObligationCauseCode,
|
||||
};
|
||||
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_errors::{pluralize, struct_span_err};
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::Node;
|
||||
use rustc_middle::middle::region;
|
||||
use rustc_middle::ty::error::TypeError;
|
||||
use rustc_middle::ty::{
|
||||
|
@ -62,12 +68,6 @@ use rustc_middle::ty::{
|
|||
subst::{Subst, SubstsRef},
|
||||
Region, Ty, TyCtxt, TypeFoldable,
|
||||
};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_errors::{pluralize, struct_span_err};
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::Node;
|
||||
use rustc_span::{DesugaringKind, Pos, Span};
|
||||
use rustc_target::spec::abi;
|
||||
use std::{cmp, fmt};
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
use crate::infer::type_variable::TypeVariableOriginKind;
|
||||
use crate::infer::InferCtxt;
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::ty::print::Print;
|
||||
use rustc_middle::ty::{self, DefIdTree, Infer, Ty, TyVar};
|
||||
use rustc_errors::{pluralize, struct_span_err, Applicability, DiagnosticBuilder};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{DefKind, Namespace};
|
||||
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
|
||||
use rustc_hir::{Body, Expr, ExprKind, FnRetTy, HirId, Local, Pat};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::ty::print::Print;
|
||||
use rustc_middle::ty::{self, DefIdTree, Infer, Ty, TyVar};
|
||||
use rustc_span::source_map::DesugaringKind;
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::Span;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::middle::resolve_lifetime as rl;
|
||||
use rustc_middle::ty::{self, Region, TyCtxt};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
|
||||
use rustc_hir::Node;
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::middle::resolve_lifetime as rl;
|
||||
use rustc_middle::ty::{self, Region, TyCtxt};
|
||||
|
||||
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
/// This function calls the `visit_ty` method for the parameters
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError::*;
|
||||
use crate::infer::InferCtxt;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
mod different_lifetimes;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
//! Error Reporting for Anonymous Region Lifetime Errors
|
||||
//! where one region is named and the other is anonymous.
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use rustc_middle::ty;
|
||||
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
|
||||
use rustc_hir::{FnRetTy, TyKind};
|
||||
use rustc_middle::ty;
|
||||
|
||||
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
/// When given a `ConcreteFailure` for a function with parameters containing a named region and
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError::SubSupConflict;
|
||||
use crate::infer::SubregionOrigin;
|
||||
use rustc_hir::{Expr, ExprKind::Closure, Node};
|
||||
use rustc_middle::ty::RegionKind;
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_hir::{Expr, ExprKind::Closure, Node};
|
||||
|
||||
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
/// Print the error message for lifetime errors when binding escapes a closure.
|
||||
|
|
|
@ -3,13 +3,13 @@ use crate::infer::lexical_region_resolve::RegionResolutionError;
|
|||
use crate::infer::ValuePairs;
|
||||
use crate::infer::{SubregionOrigin, TypeTrace};
|
||||
use crate::traits::{ObligationCause, ObligationCauseCode};
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_hir::def::Namespace;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::error::ExpectedFound;
|
||||
use rustc_middle::ty::print::{FmtPrinter, Print, RegionHighlightMode};
|
||||
use rustc_middle::ty::subst::SubstsRef;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_hir::def::Namespace;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
use crate::infer::error_reporting::msg_span_from_free_region;
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_middle::ty::{BoundRegion, FreeRegion, RegionKind};
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_errors::Applicability;
|
||||
|
||||
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
/// Print the error message for lifetime errors when the return type is a static impl Trait.
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
//! anonymous regions.
|
||||
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use rustc_middle::ty::{self, DefIdTree, Region, Ty};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::{self, DefIdTree, Region, Ty};
|
||||
use rustc_span::Span;
|
||||
|
||||
// The struct contains the information about the anonymous region
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::infer::error_reporting::{note_and_explain_region, ObligationCauseExt};
|
||||
use crate::infer::{self, InferCtxt, SubregionOrigin};
|
||||
use rustc_errors::{struct_span_err, DiagnosticBuilder};
|
||||
use rustc_middle::middle::region;
|
||||
use rustc_middle::ty::error::TypeError;
|
||||
use rustc_middle::ty::{self, Region};
|
||||
use rustc_errors::{struct_span_err, DiagnosticBuilder};
|
||||
|
||||
impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
pub(super) fn note_region_origin(
|
||||
|
|
|
@ -9,17 +9,17 @@ use crate::infer::region_constraints::VerifyBound;
|
|||
use crate::infer::RegionVariableOrigin;
|
||||
use crate::infer::RegionckMode;
|
||||
use crate::infer::SubregionOrigin;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::graph::implementation::{
|
||||
Direction, Graph, NodeIndex, INCOMING, OUTGOING,
|
||||
};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_middle::middle::free_region::RegionRelations;
|
||||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{ReEarlyBound, ReEmpty, ReErased, ReFree, ReStatic};
|
||||
use rustc_middle::ty::{ReLateBound, RePlaceholder, ReScope, ReVar};
|
||||
use rustc_middle::ty::{Region, RegionVid};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::graph::implementation::{
|
||||
Direction, Graph, NodeIndex, INCOMING, OUTGOING,
|
||||
};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_span::Span;
|
||||
use std::fmt;
|
||||
|
||||
|
|
|
@ -8,6 +8,13 @@ pub use self::ValuePairs::*;
|
|||
|
||||
use crate::traits::{self, ObligationCause, PredicateObligations, TraitEngine};
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_data_structures::unify as ut;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_middle::infer::canonical::{Canonical, CanonicalVarValues};
|
||||
use rustc_middle::infer::unify_key::{ConstVarValue, ConstVariableValue};
|
||||
use rustc_middle::infer::unify_key::{ConstVariableOrigin, ConstVariableOriginKind, ToType};
|
||||
|
@ -23,13 +30,6 @@ use rustc_middle::ty::subst::{GenericArg, GenericArgKind, InternalSubsts, Substs
|
|||
pub use rustc_middle::ty::IntVarValue;
|
||||
use rustc_middle::ty::{self, GenericParamDefKind, InferConst, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{ConstVid, FloatVid, IntVid, TyVid};
|
||||
use rustc_ast::ast;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_data_structures::unify as ut;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_session::config::BorrowckMode;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
use crate::infer::InferCtxt;
|
||||
use crate::infer::{ConstVarValue, ConstVariableValue};
|
||||
use crate::traits::DomainGoal;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_middle::ty::error::TypeError;
|
||||
use rustc_middle::ty::fold::{TypeFoldable, TypeVisitor};
|
||||
use rustc_middle::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use rustc_middle::ty::subst::GenericArg;
|
||||
use rustc_middle::ty::{self, InferConst, Ty, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use std::fmt::Debug;
|
||||
|
||||
#[derive(PartialEq)]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::infer::{GenericKind, InferCtxt};
|
||||
use crate::traits::query::OutlivesBound;
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::free_region_map::FreeRegionMap;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::free_region_map::FreeRegionMap;
|
||||
|
||||
use super::explicit_outlives_bounds;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::infer::outlives::env::RegionBoundPairs;
|
||||
use crate::infer::{GenericKind, VerifyBound};
|
||||
use crate::traits;
|
||||
use rustc_middle::ty::subst::{InternalSubsts, Subst};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::subst::{InternalSubsts, Subst};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
|
||||
use smallvec::smallvec;
|
||||
|
||||
|
|
|
@ -6,15 +6,15 @@ use self::UndoLog::*;
|
|||
use super::unify_key;
|
||||
use super::{MiscVariable, RegionVariableOrigin, SubregionOrigin};
|
||||
|
||||
use rustc_middle::ty::ReStatic;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{ReLateBound, ReVar};
|
||||
use rustc_middle::ty::{Region, RegionVid};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_data_structures::unify as ut;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::ty::ReStatic;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{ReLateBound, ReVar};
|
||||
use rustc_middle::ty::{Region, RegionVid};
|
||||
use rustc_span::Span;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use rustc_middle::ty::{self, Ty, TyVid};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::{self, Ty, TyVid};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::infer::InferCtxt;
|
||||
use crate::traits::Obligation;
|
||||
use rustc_middle::ty::{self, ToPredicate, Ty, WithConstness};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::{self, ToPredicate, Ty, WithConstness};
|
||||
|
||||
use super::FulfillmentError;
|
||||
use super::{ObligationCause, PredicateObligation};
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use super::ObjectSafetyViolation;
|
||||
|
||||
use crate::infer::InferCtxt;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_ast::ast;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::Span;
|
||||
use std::fmt;
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ mod project;
|
|||
mod structural_impls;
|
||||
mod util;
|
||||
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty::error::{ExpectedFound, TypeError};
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_hir as hir;
|
||||
use rustc_span::Span;
|
||||
|
||||
pub use self::FulfillmentErrorCode::*;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
use super::PredicateObligation;
|
||||
|
||||
use rustc_data_structures::snapshot_map::{Snapshot, SnapshotMap};
|
||||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_data_structures::snapshot_map::{Snapshot, SnapshotMap};
|
||||
|
||||
pub use rustc_middle::traits::Reveal;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use smallvec::smallvec;
|
||||
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_middle::ty::outlives::Component;
|
||||
use rustc_middle::ty::{self, ToPolyTraitRef, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
|
||||
fn anonymize_predicate<'tcx>(tcx: TyCtxt<'tcx>, pred: &ty::Predicate<'tcx>) -> ty::Predicate<'tcx> {
|
||||
match *pred {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
pub use crate::passes::BoxedResolver;
|
||||
use crate::util;
|
||||
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_ast::ast::{self, MetaItemKind};
|
||||
use rustc_ast::token;
|
||||
use rustc_codegen_ssa::traits::CodegenBackend;
|
||||
|
@ -11,6 +9,8 @@ use rustc_data_structures::sync::Lrc;
|
|||
use rustc_data_structures::OnDrop;
|
||||
use rustc_errors::registry::Registry;
|
||||
use rustc_lint::LintStore;
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_parse::new_parser_from_source_str;
|
||||
use rustc_session::config::{self, ErrorOutputType, Input, OutputFilenames};
|
||||
use rustc_session::early_error;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_ast::attr;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
|
||||
use rustc_hir::itemlikevisit::ItemLikeVisitor;
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
pub fn find(tcx: TyCtxt<'_>) -> Option<DefId> {
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
use crate::interface::{Compiler, Result};
|
||||
use crate::passes::{self, BoxedResolver, QueryContext};
|
||||
|
||||
use rustc_middle::arena::Arena;
|
||||
use rustc_middle::dep_graph::DepGraph;
|
||||
use rustc_middle::ty::steal::Steal;
|
||||
use rustc_middle::ty::{GlobalCtxt, ResolverOutputs, TyCtxt};
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_ast::{self, ast};
|
||||
use rustc_codegen_ssa::traits::CodegenBackend;
|
||||
use rustc_data_structures::sync::{Lrc, Once, WorkerLocal};
|
||||
|
@ -13,6 +8,11 @@ use rustc_hir::def_id::LOCAL_CRATE;
|
|||
use rustc_hir::Crate;
|
||||
use rustc_incremental::DepGraphFuture;
|
||||
use rustc_lint::LintStore;
|
||||
use rustc_middle::arena::Arena;
|
||||
use rustc_middle::dep_graph::DepGraph;
|
||||
use rustc_middle::ty::steal::Steal;
|
||||
use rustc_middle::ty::{GlobalCtxt, ResolverOutputs, TyCtxt};
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_session::config::{OutputFilenames, OutputType};
|
||||
use rustc_session::{output::find_crate_name, Session};
|
||||
use rustc_span::symbol::sym;
|
||||
|
|
|
@ -2,9 +2,9 @@ extern crate getopts;
|
|||
|
||||
use crate::interface::parse_cfgspecs;
|
||||
|
||||
use rustc_middle::middle::cstore;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{emitter::HumanReadableErrorType, registry, ColorConfig};
|
||||
use rustc_middle::middle::cstore;
|
||||
use rustc_session::config::{build_configuration, build_session_options, to_crate_config};
|
||||
use rustc_session::config::{rustc_optgroups, ErrorOutputType, ExternLocation, Options, Passes};
|
||||
use rustc_session::config::{ExternEntry, LinkerPluginLto, LtoCli, SwitchWithOptPath};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use log::info;
|
||||
use rustc_middle::ty;
|
||||
use rustc_ast::ast::{AttrVec, BlockCheckMode};
|
||||
use rustc_ast::mut_visit::{visit_clobber, MutVisitor, *};
|
||||
use rustc_ast::ptr::P;
|
||||
|
@ -14,6 +13,7 @@ use rustc_data_structures::stable_hasher::StableHasher;
|
|||
use rustc_data_structures::sync::{Lock, Lrc};
|
||||
use rustc_errors::registry::Registry;
|
||||
use rustc_metadata::dynamic_lib::DynamicLibrary;
|
||||
use rustc_middle::ty;
|
||||
use rustc_resolve::{self, Resolver};
|
||||
use rustc_session as session;
|
||||
use rustc_session::config::{ErrorOutputType, Input, OutputFilenames};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::{LateContext, LateLintPass, LintContext};
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::adjustment::{Adjust, Adjustment};
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::adjustment::{Adjust, Adjustment};
|
||||
use rustc_session::lint::FutureIncompatibleInfo;
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
//! for all lint attributes.
|
||||
|
||||
use crate::{passes::LateLintPassObject, LateContext, LateLintPass, LintStore};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::walk_list;
|
||||
use rustc_data_structures::sync::{join, par_iter, ParallelIterator};
|
||||
|
@ -24,6 +22,8 @@ use rustc_hir as hir;
|
|||
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
||||
use rustc_hir::intravisit as hir_visit;
|
||||
use rustc_hir::intravisit::Visitor;
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_session::lint::LintPass;
|
||||
use rustc_span::Span;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
use crate::context::{CheckLintNameResult, LintStore};
|
||||
use crate::late::unerased_lint_store;
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::lint::LintDiagnosticBuilder;
|
||||
use rustc_middle::lint::{struct_lint_level, LintLevelMap, LintLevelSets, LintSet, LintSource};
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::unwrap_or;
|
||||
|
@ -14,6 +9,11 @@ use rustc_errors::{struct_span_err, Applicability};
|
|||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
|
||||
use rustc_hir::{intravisit, HirId};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::lint::LintDiagnosticBuilder;
|
||||
use rustc_middle::lint::{struct_lint_level, LintLevelMap, LintLevelSets, LintSet, LintSource};
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::lint::{builtin, Level, Lint};
|
||||
use rustc_session::parse::feature_err;
|
||||
use rustc_session::Session;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
|
||||
use rustc_middle::ty;
|
||||
use rustc_ast::ast;
|
||||
use rustc_attr as attr;
|
||||
use rustc_errors::Applicability;
|
||||
|
@ -7,6 +6,7 @@ use rustc_hir as hir;
|
|||
use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_hir::intravisit::FnKind;
|
||||
use rustc_hir::{GenericParamKind, PatKind};
|
||||
use rustc_middle::ty;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::{symbol::Ident, BytePos, Span};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
|
||||
use rustc_middle::ty::adjustment;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::util::parser;
|
||||
|
@ -11,6 +9,8 @@ use rustc_feature::{AttributeType, BuiltinAttribute, BUILTIN_ATTRIBUTE_MAP};
|
|||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::adjustment;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_session::lint::builtin::UNUSED_ATTRIBUTES;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::symbol::{kw, sym};
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
use crate::locator::{CrateLocator, CratePaths};
|
||||
use crate::rmeta::{CrateDep, CrateMetadata, CrateNumMap, CrateRoot, MetadataBlob};
|
||||
|
||||
use rustc_middle::middle::cstore::DepKind;
|
||||
use rustc_middle::middle::cstore::{CrateSource, ExternCrate, ExternCrateSource, MetadataLoaderDyn};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_ast::expand::allocator::{global_allocator_spans, AllocatorKind};
|
||||
use rustc_ast::{ast, attr};
|
||||
use rustc_data_structures::svh::Svh;
|
||||
|
@ -15,6 +12,11 @@ use rustc_expand::base::SyntaxExtension;
|
|||
use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
|
||||
use rustc_hir::definitions::Definitions;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::middle::cstore::DepKind;
|
||||
use rustc_middle::middle::cstore::{
|
||||
CrateSource, ExternCrate, ExternCrateSource, MetadataLoaderDyn,
|
||||
};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::config;
|
||||
use rustc_session::output::validate_crate_name;
|
||||
use rustc_session::search_paths::PathKind;
|
||||
|
|
|
@ -53,12 +53,12 @@
|
|||
|
||||
use crate::creader::CStore;
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_middle::middle::cstore::LinkagePreference::{self, RequireDynamic, RequireStatic};
|
||||
use rustc_middle::middle::cstore::{self, DepKind};
|
||||
use rustc_middle::middle::dependency_format::{Dependencies, DependencyList, Linkage};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_session::config;
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_middle::middle::cstore::ForeignModule;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::itemlikevisit::ItemLikeVisitor;
|
||||
use rustc_middle::middle::cstore::ForeignModule;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
||||
crate fn collect(tcx: TyCtxt<'_>) -> Vec<ForeignModule> {
|
||||
let mut collector = Collector { tcx, modules: Vec::new() };
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::itemlikevisit::ItemLikeVisitor;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
|
|
|
@ -215,11 +215,11 @@
|
|||
use crate::creader::Library;
|
||||
use crate::rmeta::{rustc_version, MetadataBlob, METADATA_HEADER};
|
||||
|
||||
use rustc_middle::middle::cstore::{CrateSource, MetadataLoader};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::svh::Svh;
|
||||
use rustc_data_structures::sync::MetadataRef;
|
||||
use rustc_errors::{struct_span_err, DiagnosticBuilder};
|
||||
use rustc_middle::middle::cstore::{CrateSource, MetadataLoader};
|
||||
use rustc_session::filesearch::{FileDoesntMatch, FileMatches, FileSearch};
|
||||
use rustc_session::search_paths::PathKind;
|
||||
use rustc_session::{config, CrateDisambiguator, Session};
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use rustc_middle::middle::cstore::{self, NativeLibrary};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_attr as attr;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::itemlikevisit::ItemLikeVisitor;
|
||||
use rustc_middle::middle::cstore::{self, NativeLibrary};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::parse::feature_err;
|
||||
use rustc_session::Session;
|
||||
use rustc_span::source_map::Span;
|
||||
|
|
|
@ -4,17 +4,6 @@ use crate::creader::CrateMetadataRef;
|
|||
use crate::rmeta::table::{FixedSizeEncoding, Table};
|
||||
use crate::rmeta::*;
|
||||
|
||||
use rustc_middle::dep_graph::{self, DepNode, DepNodeExt, DepNodeIndex};
|
||||
use rustc_middle::hir::exports::Export;
|
||||
use rustc_middle::middle::cstore::{CrateSource, ExternCrate};
|
||||
use rustc_middle::middle::cstore::{ForeignModule, LinkagePreference, NativeLibrary};
|
||||
use rustc_middle::middle::exported_symbols::{ExportedSymbol, SymbolExportLevel};
|
||||
use rustc_middle::middle::lang_items;
|
||||
use rustc_middle::mir::interpret::{AllocDecodingSession, AllocDecodingState};
|
||||
use rustc_middle::mir::{self, interpret, BodyAndCache, Promoted};
|
||||
use rustc_middle::ty::codec::TyDecoder;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_middle::util::common::record_time;
|
||||
use rustc_ast::ast::{self, Ident};
|
||||
use rustc_attr as attr;
|
||||
use rustc_data_structures::captures::Captures;
|
||||
|
@ -30,6 +19,17 @@ use rustc_hir::def_id::{CrateNum, DefId, DefIndex, LocalDefId, CRATE_DEF_INDEX,
|
|||
use rustc_hir::definitions::DefPathTable;
|
||||
use rustc_hir::definitions::{DefKey, DefPath, DefPathData, DefPathHash};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_middle::dep_graph::{self, DepNode, DepNodeExt, DepNodeIndex};
|
||||
use rustc_middle::hir::exports::Export;
|
||||
use rustc_middle::middle::cstore::{CrateSource, ExternCrate};
|
||||
use rustc_middle::middle::cstore::{ForeignModule, LinkagePreference, NativeLibrary};
|
||||
use rustc_middle::middle::exported_symbols::{ExportedSymbol, SymbolExportLevel};
|
||||
use rustc_middle::middle::lang_items;
|
||||
use rustc_middle::mir::interpret::{AllocDecodingSession, AllocDecodingState};
|
||||
use rustc_middle::mir::{self, interpret, BodyAndCache, Promoted};
|
||||
use rustc_middle::ty::codec::TyDecoder;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_middle::util::common::record_time;
|
||||
use rustc_serialize::{opaque, Decodable, Decoder, SpecializedDecoder};
|
||||
use rustc_session::Session;
|
||||
use rustc_span::source_map::{self, respan, Spanned};
|
||||
|
|
|
@ -4,13 +4,6 @@ use crate::link_args;
|
|||
use crate::native_libs;
|
||||
use crate::rmeta::{self, encoder};
|
||||
|
||||
use rustc_middle::hir::exports::Export;
|
||||
use rustc_middle::middle::cstore::{CrateSource, CrateStore, EncodedMetadata, NativeLibraryKind};
|
||||
use rustc_middle::middle::exported_symbols::ExportedSymbol;
|
||||
use rustc_middle::middle::stability::DeprecationEntry;
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::query::QueryConfig;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
|
@ -19,6 +12,13 @@ use rustc_hir as hir;
|
|||
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, CRATE_DEF_INDEX, LOCAL_CRATE};
|
||||
use rustc_hir::definitions::DefPathTable;
|
||||
use rustc_hir::definitions::{DefKey, DefPath, DefPathHash};
|
||||
use rustc_middle::hir::exports::Export;
|
||||
use rustc_middle::middle::cstore::{CrateSource, CrateStore, EncodedMetadata, NativeLibraryKind};
|
||||
use rustc_middle::middle::exported_symbols::ExportedSymbol;
|
||||
use rustc_middle::middle::stability::DeprecationEntry;
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::query::QueryConfig;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_session::{CrateDisambiguator, Session};
|
||||
use rustc_span::source_map::{self, Span, Spanned};
|
||||
use rustc_span::symbol::Symbol;
|
||||
|
|
|
@ -2,16 +2,6 @@ use crate::rmeta::table::FixedSizeEncoding;
|
|||
use crate::rmeta::*;
|
||||
|
||||
use log::{debug, trace};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::middle::cstore::{EncodedMetadata, ForeignModule, LinkagePreference, NativeLibrary};
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
use rustc_middle::middle::exported_symbols::{metadata_symbol_name, ExportedSymbol, SymbolExportLevel};
|
||||
use rustc_middle::middle::lang_items;
|
||||
use rustc_middle::mir::{self, interpret};
|
||||
use rustc_middle::traits::specialization_graph;
|
||||
use rustc_middle::ty::codec::{self as ty_codec, TyEncoder};
|
||||
use rustc_middle::ty::layout::VariantIdx;
|
||||
use rustc_middle::ty::{self, SymbolName, Ty, TyCtxt};
|
||||
use rustc_ast::ast::{self, Ident};
|
||||
use rustc_ast::attr;
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
|
@ -27,6 +17,20 @@ use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
|
|||
use rustc_hir::itemlikevisit::{ItemLikeVisitor, ParItemLikeVisitor};
|
||||
use rustc_hir::{AnonConst, GenericParamKind};
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::middle::cstore::{
|
||||
EncodedMetadata, ForeignModule, LinkagePreference, NativeLibrary,
|
||||
};
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
use rustc_middle::middle::exported_symbols::{
|
||||
metadata_symbol_name, ExportedSymbol, SymbolExportLevel,
|
||||
};
|
||||
use rustc_middle::middle::lang_items;
|
||||
use rustc_middle::mir::{self, interpret};
|
||||
use rustc_middle::traits::specialization_graph;
|
||||
use rustc_middle::ty::codec::{self as ty_codec, TyEncoder};
|
||||
use rustc_middle::ty::layout::VariantIdx;
|
||||
use rustc_middle::ty::{self, SymbolName, Ty, TyCtxt};
|
||||
use rustc_serialize::{opaque, Encodable, Encoder, SpecializedEncoder};
|
||||
use rustc_session::config::{self, CrateType};
|
||||
use rustc_span::source_map::Spanned;
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
use decoder::Metadata;
|
||||
use table::{Table, TableBuilder};
|
||||
|
||||
use rustc_middle::hir::exports::Export;
|
||||
use rustc_middle::middle::cstore::{DepKind, ForeignModule, LinkagePreference, NativeLibrary};
|
||||
use rustc_middle::middle::exported_symbols::{ExportedSymbol, SymbolExportLevel};
|
||||
use rustc_middle::middle::lang_items;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::{self, ReprOptions, Ty};
|
||||
use rustc_ast::ast::{self, MacroDef};
|
||||
use rustc_attr as attr;
|
||||
use rustc_data_structures::svh::Svh;
|
||||
|
@ -15,6 +9,12 @@ use rustc_hir as hir;
|
|||
use rustc_hir::def::CtorKind;
|
||||
use rustc_hir::def_id::{DefId, DefIndex};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::hir::exports::Export;
|
||||
use rustc_middle::middle::cstore::{DepKind, ForeignModule, LinkagePreference, NativeLibrary};
|
||||
use rustc_middle::middle::exported_symbols::{ExportedSymbol, SymbolExportLevel};
|
||||
use rustc_middle::middle::lang_items;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::{self, ReprOptions, Ty};
|
||||
use rustc_serialize::opaque::Encoder;
|
||||
use rustc_session::config::SymbolManglingVersion;
|
||||
use rustc_session::CrateDisambiguator;
|
||||
|
|
|
@ -3,13 +3,13 @@ use crate::borrow_check::path_utils::allow_two_phase_borrow;
|
|||
use crate::borrow_check::place_ext::PlaceExt;
|
||||
use crate::dataflow::indexes::BorrowIndex;
|
||||
use crate::dataflow::move_paths::MoveData;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::mir::traversal;
|
||||
use rustc_middle::mir::visit::{MutatingUseContext, NonUseContext, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::{self, Body, Local, Location, ReadOnlyBodyAndCache};
|
||||
use rustc_middle::ty::{RegionVid, TyCtxt};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use std::fmt;
|
||||
use std::ops::Index;
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use rustc_infer::infer::InferCtxt;
|
||||
use rustc_middle::mir::visit::TyContext;
|
||||
use rustc_middle::mir::visit::Visitor;
|
||||
use rustc_middle::mir::{
|
||||
|
@ -7,7 +8,6 @@ use rustc_middle::mir::{
|
|||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::subst::SubstsRef;
|
||||
use rustc_middle::ty::{self, RegionVid, Ty};
|
||||
use rustc_infer::infer::InferCtxt;
|
||||
|
||||
use crate::borrow_check::{
|
||||
borrow_set::BorrowSet, facts::AllFacts, location::LocationTable, nll::ToRegionVid,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_middle::mir::ConstraintCategory;
|
||||
use rustc_middle::ty::RegionVid;
|
||||
use rustc_data_structures::graph;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::mir::ConstraintCategory;
|
||||
use rustc_middle::ty::RegionVid;
|
||||
use rustc_span::DUMMY_SP;
|
||||
|
||||
use crate::borrow_check::{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_middle::mir::ConstraintCategory;
|
||||
use rustc_middle::ty::RegionVid;
|
||||
use rustc_data_structures::graph::scc::Sccs;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::mir::ConstraintCategory;
|
||||
use rustc_middle::ty::RegionVid;
|
||||
use std::fmt;
|
||||
use std::ops::Index;
|
||||
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_infer::infer::NLLRegionVariableOrigin;
|
||||
use rustc_middle::mir::{
|
||||
Body, CastKind, ConstraintCategory, FakeReadCause, Local, Location, Operand, Place, Rvalue,
|
||||
Statement, StatementKind, TerminatorKind,
|
||||
};
|
||||
use rustc_middle::ty::adjustment::PointerCast;
|
||||
use rustc_middle::ty::{self, RegionVid, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_infer::infer::NLLRegionVariableOrigin;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ use crate::borrow_check::{
|
|||
region_infer::{Cause, RegionInferenceContext},
|
||||
};
|
||||
use crate::util::liveness::{self, DefUse};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_middle::mir::visit::{MirVisitable, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::{Body, Local, Location};
|
||||
use rustc_middle::ty::{RegionVid, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
|
||||
crate fn find<'tcx>(
|
||||
body: &Body<'tcx>,
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
//! Borrow checker diagnostics.
|
||||
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::Namespace;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::GeneratorKind;
|
||||
use rustc_middle::mir::{
|
||||
AggregateKind, Constant, Field, Local, LocalInfo, LocalKind, Location, Operand, Place,
|
||||
PlaceRef, ProjectionElem, Rvalue, Statement, StatementKind, Terminator, TerminatorKind,
|
||||
|
@ -7,11 +12,6 @@ use rustc_middle::mir::{
|
|||
use rustc_middle::ty::layout::VariantIdx;
|
||||
use rustc_middle::ty::print::Print;
|
||||
use rustc_middle::ty::{self, DefIdTree, Ty, TyCtxt};
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::Namespace;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::GeneratorKind;
|
||||
use rustc_span::Span;
|
||||
|
||||
use super::borrow_set::BorrowData;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty;
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||
use rustc_span::source_map::DesugaringKind;
|
||||
use rustc_span::{Span, Symbol};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use rustc_middle::mir::{self, ClearCrossCrate, Local, LocalInfo, Location};
|
||||
use rustc_middle::mir::{Mutability, Place, PlaceRef, ProjectionElem};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::Node;
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_middle::mir::{self, ClearCrossCrate, Local, LocalInfo, Location};
|
||||
use rustc_middle::mir::{Mutability, Place, PlaceRef, ProjectionElem};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_span::source_map::DesugaringKind;
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::Span;
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use log::debug;
|
||||
use rustc_middle::ty::RegionVid;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_middle::ty::RegionVid;
|
||||
|
||||
use smallvec::SmallVec;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
//! Error reporting machinery for lifetime errors.
|
||||
|
||||
use rustc_middle::mir::ConstraintCategory;
|
||||
use rustc_middle::ty::{self, RegionVid, Ty};
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||
use rustc_infer::infer::{
|
||||
error_reporting::nice_region_error::NiceRegionError,
|
||||
error_reporting::unexpected_hidden_region_diagnostic, NLLRegionVariableOrigin,
|
||||
};
|
||||
use rustc_middle::mir::ConstraintCategory;
|
||||
use rustc_middle::ty::{self, RegionVid, Ty};
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::Span;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use std::fmt::{self, Display};
|
||||
|
||||
use rustc_middle::ty::print::RegionHighlightMode;
|
||||
use rustc_middle::ty::subst::{GenericArgKind, SubstsRef};
|
||||
use rustc_middle::ty::{self, RegionVid, Ty};
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_middle::ty::print::RegionHighlightMode;
|
||||
use rustc_middle::ty::subst::{GenericArgKind, SubstsRef};
|
||||
use rustc_middle::ty::{self, RegionVid, Ty};
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::{symbol::Symbol, Span, DUMMY_SP};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::borrow_check::Upvar;
|
||||
use crate::borrow_check::{nll::ToRegionVid, region_infer::RegionInferenceContext};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_middle::mir::{Body, Local};
|
||||
use rustc_middle::ty::{RegionVid, TyCtxt};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_span::source_map::Span;
|
||||
use rustc_span::symbol::Symbol;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue