Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ fn borrowck_collect_region_constraints<'tcx>(
deferred_closure_requirements,
polonius_context,
} = type_check::type_check(
root_cx,
&infcx,
body,
&promoted,
Expand Down
7 changes: 2 additions & 5 deletions compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use crate::region_infer::values::{LivenessValues, PlaceholderIndex, PlaceholderI
use crate::session_diagnostics::{MoveUnsized, SimdIntrinsicArgConst};
use crate::type_check::free_region_relations::{CreateResult, UniversalRegionRelations};
use crate::universal_regions::{DefiningTy, UniversalRegions};
use crate::{BorrowCheckRootCtxt, BorrowckInferCtxt, DeferredClosureRequirements, path_utils};
use crate::{BorrowckInferCtxt, DeferredClosureRequirements, path_utils};

macro_rules! span_mirbug {
($context:expr, $elem:expr, $($message:tt)*) => ({
Expand Down Expand Up @@ -94,7 +94,6 @@ mod relate_tys;
/// - `move_data` -- move-data constructed when performing the maybe-init dataflow analysis
/// - `location_map` -- map between MIR `Location` and `PointIndex`
pub(crate) fn type_check<'tcx>(
root_cx: &BorrowCheckRootCtxt<'_, 'tcx>,
infcx: &BorrowckInferCtxt<'tcx>,
body: &Body<'tcx>,
promoted: &IndexSlice<Promoted, Body<'tcx>>,
Expand Down Expand Up @@ -145,7 +144,6 @@ pub(crate) fn type_check<'tcx>(

let mut deferred_closure_requirements = Default::default();
let mut typeck = TypeChecker {
root_cx,
infcx,
last_span: body.span,
body,
Expand Down Expand Up @@ -227,7 +225,6 @@ enum FieldAccessError {
/// way, it accrues region constraints -- these can later be used by
/// NLL region checking.
struct TypeChecker<'a, 'tcx> {
root_cx: &'a BorrowCheckRootCtxt<'a, 'tcx>,
infcx: &'a BorrowckInferCtxt<'tcx>,
last_span: Span,
body: &'a Body<'tcx>,
Expand Down Expand Up @@ -2715,7 +2712,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
args: GenericArgsRef<'tcx>,
location: Location,
) -> ty::InstantiatedClauses<'tcx> {
let root_def_id = self.root_cx.root_def_id();
let root_def_id = self.infcx.root_def_id;
// We will have to handle propagated closure requirements for this closure,
// but need to defer this until the nested body has been fully borrow checked.
self.deferred_closure_requirements.push((def_id, args, location.to_locations()));
Expand Down
Loading