Rollup merge of #95693 - RalfJung:more-context, r=oli-obk
interp: pass TyCtxt to Machine methods that do not take InterpCx This just seems like something you might need, so let's consistently have it. One day we might have to add `ParamEnv` as well, though that seems less likely (and in Miri you can always use `reveal_all` anyway). It might make sense to have a type that packages `TyCtxt` and `ParamEnv`, this pairing occurs quite frequently in rustc... r? `@oli-obk`
This commit is contained in:
commit
acdba55b53
5 changed files with 15 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
use rustc_hir::def::DefKind;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use std::borrow::Borrow;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::hash::Hash;
|
||||
|
@ -471,6 +471,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
|
|||
}
|
||||
|
||||
fn before_access_global(
|
||||
_tcx: TyCtxt<'tcx>,
|
||||
machine: &Self,
|
||||
alloc_id: AllocId,
|
||||
alloc: ConstAllocation<'tcx>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue