do not pass TyCtxt by reference
This commit is contained in:
parent
7f4f6072aa
commit
e79a331fea
@ -858,7 +858,7 @@ pub fn isolation_abort_error<'tcx>(name: &str) -> InterpResult<'tcx> {
|
||||
|
||||
/// Retrieve the list of local crates that should have been passed by cargo-miri in
|
||||
/// MIRI_LOCAL_CRATES and turn them into `CrateNum`s.
|
||||
pub fn get_local_crates(tcx: &TyCtxt<'_>) -> Vec<CrateNum> {
|
||||
pub fn get_local_crates(tcx: TyCtxt<'_>) -> Vec<CrateNum> {
|
||||
// Convert the local crate names from the passed-in config into CrateNums so that they can
|
||||
// be looked up quickly during execution
|
||||
let local_crate_names = std::env::var("MIRI_LOCAL_CRATES")
|
||||
|
@ -327,7 +327,7 @@ pub struct Evaluator<'mir, 'tcx> {
|
||||
|
||||
impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
|
||||
pub(crate) fn new(config: &MiriConfig, layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Self {
|
||||
let local_crates = helpers::get_local_crates(&layout_cx.tcx);
|
||||
let local_crates = helpers::get_local_crates(layout_cx.tcx);
|
||||
let layouts =
|
||||
PrimitiveLayouts::new(layout_cx).expect("Couldn't get layouts of primitive types");
|
||||
let profiler = config.measureme_out.as_ref().map(|out| {
|
||||
|
Loading…
Reference in New Issue
Block a user