Function rustc_mir::borrow_check::nll::type_check::type_check[][src]

pub(crate) fn type_check<'gcx, 'tcx>(
    infcx: &InferCtxt<'_, 'gcx, 'tcx>,
    param_env: ParamEnv<'gcx>,
    mir: &Mir<'tcx>,
    mir_def_id: DefId,
    universal_regions: &Rc<UniversalRegions<'tcx>>,
    location_table: &LocationTable,
    borrow_set: &BorrowSet<'tcx>,
    liveness: &LivenessResults<LocalWithRegion>,
    all_facts: &mut Option<PoloniusAllFacts<RegionVid, BorrowIndex, LocationIndex>>,
    flow_inits: &mut FlowAtLocation<MaybeInitializedPlaces<'_, 'gcx, 'tcx>>,
    move_data: &MoveData<'tcx>,
    elements: &Rc<RegionValueElements>,
    errors_buffer: &mut Vec<Diagnostic>
) -> (MirTypeckRegionConstraints<'tcx>, Rc<UniversalRegionRelations<'tcx>>)
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Type checks the given mir in the context of the inference context infcx. Returns any region constraints that have yet to be proven. This result is includes liveness constraints that ensure that regions appearing in the types of all local variables are live at all points where that local variable may later be used.

This phase of type-check ought to be infallible -- this is because the original, HIR-based type-check succeeded. So if any errors occur here, we will get a bug! reported.

Parameters