Skip to content

Commit 8bcb806

Browse files
committed
Auto merge of rust-lang#2178 - RalfJung:double-ref, r=RalfJung
do not pass TyCtxt by reference
2 parents 7f4f607 + e79a331 commit 8bcb806

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/helpers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ pub fn isolation_abort_error<'tcx>(name: &str) -> InterpResult<'tcx> {
858858

859859
/// Retrieve the list of local crates that should have been passed by cargo-miri in
860860
/// MIRI_LOCAL_CRATES and turn them into `CrateNum`s.
861-
pub fn get_local_crates(tcx: &TyCtxt<'_>) -> Vec<CrateNum> {
861+
pub fn get_local_crates(tcx: TyCtxt<'_>) -> Vec<CrateNum> {
862862
// Convert the local crate names from the passed-in config into CrateNums so that they can
863863
// be looked up quickly during execution
864864
let local_crate_names = std::env::var("MIRI_LOCAL_CRATES")

src/machine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ pub struct Evaluator<'mir, 'tcx> {
327327

328328
impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
329329
pub(crate) fn new(config: &MiriConfig, layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Self {
330-
let local_crates = helpers::get_local_crates(&layout_cx.tcx);
330+
let local_crates = helpers::get_local_crates(layout_cx.tcx);
331331
let layouts =
332332
PrimitiveLayouts::new(layout_cx).expect("Couldn't get layouts of primitive types");
333333
let profiler = config.measureme_out.as_ref().map(|out| {

0 commit comments

Comments
 (0)