@@ -30,6 +30,7 @@ use super::{
3030 AllocId , Allocation , InterpCx , MPlaceTy , Machine , MemoryKind , PlaceTy , err_ub, interp_ok,
3131} ;
3232use crate :: const_eval;
33+ use crate :: const_eval:: DummyMachine ;
3334use crate :: errors:: NestedStaticInThreadLocal ;
3435
3536pub trait CompileTimeMachine < ' tcx , T > = Machine <
@@ -323,14 +324,17 @@ pub fn intern_const_alloc_for_constprop<'tcx, T, M: CompileTimeMachine<'tcx, T>>
323324 interp_ok ( ( ) )
324325}
325326
326- impl < ' tcx , M : super :: intern :: CompileTimeMachine < ' tcx , ! > > InterpCx < ' tcx , M > {
327+ impl < ' tcx > InterpCx < ' tcx , DummyMachine > {
327328 /// A helper function that allocates memory for the layout given and gives you access to mutate
328329 /// it. Once your own mutation code is done, the backing `Allocation` is removed from the
329330 /// current `Memory` and interned as read-only into the global memory.
330331 pub fn intern_with_temp_alloc (
331332 & mut self ,
332333 layout : TyAndLayout < ' tcx > ,
333- f : impl FnOnce ( & mut InterpCx < ' tcx , M > , & PlaceTy < ' tcx , M :: Provenance > ) -> InterpResult < ' tcx , ( ) > ,
334+ f : impl FnOnce (
335+ & mut InterpCx < ' tcx , DummyMachine > ,
336+ & PlaceTy < ' tcx , CtfeProvenance > ,
337+ ) -> InterpResult < ' tcx , ( ) > ,
334338 ) -> InterpResult < ' tcx , AllocId > {
335339 // `allocate` picks a fresh AllocId that we will associate with its data below.
336340 let dest = self . allocate ( layout, MemoryKind :: Stack ) ?;
0 commit comments