Remove TypeckResults from InferCtxt
This commit is contained in:
parent
4a68373217
commit
349415d1c6
67 changed files with 240 additions and 280 deletions
|
@ -157,7 +157,7 @@ struct BlockContext(Vec<BlockFrame>);
|
|||
|
||||
struct Builder<'a, 'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
infcx: InferCtxt<'a, 'tcx>,
|
||||
infcx: InferCtxt<'tcx>,
|
||||
typeck_results: &'tcx TypeckResults<'tcx>,
|
||||
region_scope_tree: &'tcx region::ScopeTree,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
|
@ -683,7 +683,7 @@ fn construct_error<'tcx>(
|
|||
impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
fn new(
|
||||
thir: &'a Thir<'tcx>,
|
||||
infcx: InferCtxt<'a, 'tcx>,
|
||||
infcx: InferCtxt<'tcx>,
|
||||
def: ty::WithOptConstParam<LocalDefId>,
|
||||
hir_id: hir::HirId,
|
||||
span: Span,
|
||||
|
|
|
@ -35,7 +35,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
struct ConstToPat<'a, 'tcx> {
|
||||
struct ConstToPat<'tcx> {
|
||||
id: hir::HirId,
|
||||
span: Span,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
|
@ -55,7 +55,7 @@ struct ConstToPat<'a, 'tcx> {
|
|||
behind_reference: Cell<bool>,
|
||||
|
||||
// inference context used for checking `T: Structural` bounds.
|
||||
infcx: InferCtxt<'a, 'tcx>,
|
||||
infcx: InferCtxt<'tcx>,
|
||||
|
||||
include_lint_checks: bool,
|
||||
|
||||
|
@ -71,21 +71,19 @@ mod fallback_to_const_ref {
|
|||
/// hoops to get a reference to the value.
|
||||
pub(super) struct FallbackToConstRef(());
|
||||
|
||||
pub(super) fn fallback_to_const_ref<'a, 'tcx>(
|
||||
c2p: &super::ConstToPat<'a, 'tcx>,
|
||||
) -> FallbackToConstRef {
|
||||
pub(super) fn fallback_to_const_ref<'tcx>(c2p: &super::ConstToPat<'tcx>) -> FallbackToConstRef {
|
||||
assert!(c2p.behind_reference.get());
|
||||
FallbackToConstRef(())
|
||||
}
|
||||
}
|
||||
use fallback_to_const_ref::{fallback_to_const_ref, FallbackToConstRef};
|
||||
|
||||
impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
|
||||
impl<'tcx> ConstToPat<'tcx> {
|
||||
fn new(
|
||||
pat_ctxt: &PatCtxt<'_, 'tcx>,
|
||||
id: hir::HirId,
|
||||
span: Span,
|
||||
infcx: InferCtxt<'a, 'tcx>,
|
||||
infcx: InferCtxt<'tcx>,
|
||||
) -> Self {
|
||||
trace!(?pat_ctxt.typeck_results.hir_owner);
|
||||
ConstToPat {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue