From fcdfc3e1c1c3da9f765364f73d306bf5d4fd6a63 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 5 Apr 2022 13:31:51 -0400 Subject: interp: pass TyCtxt to Machine methods that do not take InterpCx --- compiler/rustc_const_eval/src/const_eval/machine.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_const_eval/src/const_eval') diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs index 5aae4a90960..c44e27fc4a0 100644 --- a/compiler/rustc_const_eval/src/const_eval/machine.rs +++ b/compiler/rustc_const_eval/src/const_eval/machine.rs @@ -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>, -- cgit 1.4.1-3-g733a5