use crate::{build, shim};
+use rustc_data_structures::indexed_vec::IndexVec;
use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc::mir::{Body, MirPhase, Promoted};
use rustc::ty::{TyCtxt, InstanceDef};
mir_validated,
optimized_mir,
is_mir_available,
+ promoted_mir,
..*providers
};
}
]);
tcx.arena.alloc(body)
}
+
+fn promoted_mir<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx IndexVec<Promoted, Body<'tcx>> {
+ let body = tcx.optimized_mir(def_id);
+ &body.promoted
+}