rustc_typeck to rustc_hir_analysis
This commit is contained in:
parent
de0b511daa
commit
1fc86a63f4
140 changed files with 101 additions and 102 deletions
|
|
@ -17,6 +17,7 @@ use rustc_hir as hir;
|
|||
use rustc_hir::def::{CtorKind, DefKind, Res};
|
||||
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
||||
use rustc_hir::PredicateOrigin;
|
||||
use rustc_hir_analysis::hir_ty_to_ty;
|
||||
use rustc_infer::infer::region_constraints::{Constraint, RegionConstraintData};
|
||||
use rustc_middle::middle::resolve_lifetime as rl;
|
||||
use rustc_middle::ty::fold::TypeFolder;
|
||||
|
|
@ -26,7 +27,6 @@ use rustc_middle::{bug, span_bug};
|
|||
use rustc_span::hygiene::{AstPass, MacroKind};
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::{self, ExpnKind};
|
||||
use rustc_typeck::hir_ty_to_ty;
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::collections::hash_map::Entry;
|
||||
|
|
@ -632,7 +632,7 @@ fn clean_ty_generics<'tcx>(
|
|||
let mut impl_trait = BTreeMap::<ImplTraitParam, Vec<GenericBound>>::default();
|
||||
|
||||
// Bounds in the type_params and lifetimes fields are repeated in the
|
||||
// predicates field (see rustc_typeck::collect::ty_generics), so remove
|
||||
// predicates field (see rustc_hir_analysis::collect::ty_generics), so remove
|
||||
// them.
|
||||
let stripped_params = gens
|
||||
.params
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ use rustc_hir::def::{CtorKind, DefKind, Res};
|
|||
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
|
||||
use rustc_hir::lang_items::LangItem;
|
||||
use rustc_hir::{BodyId, Mutability};
|
||||
use rustc_hir_analysis::check::intrinsic::intrinsic_operation_unsafety;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::ty::fast_reject::SimplifiedType;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
|
|
@ -31,7 +32,6 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
|||
use rustc_span::{self, FileName, Loc};
|
||||
use rustc_target::abi::VariantIdx;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use rustc_typeck::check::intrinsic::intrinsic_operation_unsafety;
|
||||
|
||||
use crate::clean::cfg::Cfg;
|
||||
use crate::clean::clean_visibility;
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ pub(crate) fn create_config(
|
|||
override_queries: Some(|_sess, providers, _external_providers| {
|
||||
// Most lints will require typechecking, so just don't run them.
|
||||
providers.lint_mod = |_, _| {};
|
||||
// Prevent `rustc_typeck::check_crate` from calling `typeck` on all bodies.
|
||||
// Prevent `rustc_hir_analysis::check_crate` from calling `typeck` on all bodies.
|
||||
providers.typeck_item_bodies = |_, _| {};
|
||||
// hack so that `used_trait_imports` won't try to call typeck
|
||||
providers.used_trait_imports = |_, _| {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ extern crate rustc_errors;
|
|||
extern crate rustc_expand;
|
||||
extern crate rustc_feature;
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_hir_analysis;
|
||||
extern crate rustc_hir_pretty;
|
||||
extern crate rustc_index;
|
||||
extern crate rustc_infer;
|
||||
|
|
@ -59,7 +60,6 @@ extern crate rustc_session;
|
|||
extern crate rustc_span;
|
||||
extern crate rustc_target;
|
||||
extern crate rustc_trait_selection;
|
||||
extern crate rustc_typeck;
|
||||
extern crate test;
|
||||
|
||||
// See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue