diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-04-06 03:39:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-06 03:39:08 +0200 |
| commit | acdba55b5371f1f64912d42c98edb5149d5e67dc (patch) | |
| tree | 9d76a4b6e916688f24572b7243131a8ea46b8b24 /compiler/rustc_mir_transform/src | |
| parent | 84e1aa2d59f6e772c86a007a6817312e729ff2b6 (diff) | |
| parent | fcdfc3e1c1c3da9f765364f73d306bf5d4fd6a63 (diff) | |
| download | rust-acdba55b5371f1f64912d42c98edb5149d5e67dc.tar.gz rust-acdba55b5371f1f64912d42c98edb5149d5e67dc.zip | |
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`
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop_lint.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs index 49ebdd30254..a342aeed905 100644 --- a/compiler/rustc_mir_transform/src/const_prop.rs +++ b/compiler/rustc_mir_transform/src/const_prop.rs @@ -265,6 +265,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine<'mir, 'tcx> } fn before_access_global( + _tcx: TyCtxt<'tcx>, _machine: &Self, _alloc_id: AllocId, alloc: ConstAllocation<'tcx, Self::PointerTag, Self::AllocExtra>, diff --git a/compiler/rustc_mir_transform/src/const_prop_lint.rs b/compiler/rustc_mir_transform/src/const_prop_lint.rs index 602aa14b9e6..159503ad2d3 100644 --- a/compiler/rustc_mir_transform/src/const_prop_lint.rs +++ b/compiler/rustc_mir_transform/src/const_prop_lint.rs @@ -261,6 +261,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine<'mir, 'tcx> } fn before_access_global( + _tcx: TyCtxt<'tcx>, _machine: &Self, _alloc_id: AllocId, alloc: ConstAllocation<'tcx, Self::PointerTag, Self::AllocExtra>, |
