use rustc::hir::def_id::DefId;
use rustc::infer::InferCtxt;
use rustc::mir::{ClosureOutlivesSubject, ClosureRegionRequirements,
- Local, Location, Body, BodyCache, LocalKind, BasicBlock,
- Promoted, ReadOnlyBodyCache};
+ Local, Location, Body, BodyAndCache, LocalKind, BasicBlock,
+ Promoted, ReadOnlyBodyAndCache};
use rustc::ty::{self, RegionKind, RegionVid};
use rustc_index::vec::IndexVec;
use rustc_errors::Diagnostic;
infcx: &InferCtxt<'cx, 'tcx>,
def_id: DefId,
param_env: ty::ParamEnv<'tcx>,
- body: &mut BodyCache<'tcx>,
- promoted: &mut IndexVec<Promoted, BodyCache<'tcx>>,
+ body: &mut BodyAndCache<'tcx>,
+ promoted: &mut IndexVec<Promoted, BodyAndCache<'tcx>>,
) -> UniversalRegions<'tcx> {
debug!("replace_regions_in_mir(def_id={:?})", def_id);
infcx: &InferCtxt<'cx, 'tcx>,
def_id: DefId,
universal_regions: UniversalRegions<'tcx>,
- body: ReadOnlyBodyCache<'_, 'tcx>,
- promoted: &IndexVec<Promoted, ReadOnlyBodyCache<'_, 'tcx>>,
+ body: ReadOnlyBodyAndCache<'_, 'tcx>,
+ promoted: &IndexVec<Promoted, ReadOnlyBodyAndCache<'_, 'tcx>>,
local_names: &IndexVec<Local, Option<Symbol>>,
upvars: &[Upvar],
location_table: &LocationTable,
Option<Rc<PoloniusOutput>>,
Option<ClosureRegionRequirements<'tcx>>,
) {
- let mut all_facts = if AllFacts::enabled(infcx.tcx) {
- Some(AllFacts::default())
- } else {
- None
- };
+ let mut all_facts = AllFacts::enabled(infcx.tcx).then_some(AllFacts::default());
let universal_regions = Rc::new(universal_regions);