Skip to content

Commit

Permalink
Auto merge of rust-lang#2178 - RalfJung:double-ref, r=RalfJung
Browse files Browse the repository at this point in the history
do not pass TyCtxt by reference
  • Loading branch information
bors committed Jun 2, 2022
2 parents 7f4f607 + e79a331 commit 8bcb806
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down

0 comments on commit 8bcb806

Please sign in to comment.