@@ -274,10 +274,12 @@ impl<'tcx> Hash for MemoryData<'tcx> {
274
274
}
275
275
}
276
276
277
- impl < ' mir , ' tcx : ' mir > Machine < ' mir , ' tcx > for Evaluator < ' tcx > {
277
+ impl < ' mir , ' tcx > Machine < ' mir , ' tcx > for Evaluator < ' tcx > {
278
278
type MemoryData = MemoryData < ' tcx > ;
279
279
type MemoryKinds = memory:: MemoryKind ;
280
280
281
+ const MUT_STATIC_KIND : Option < memory:: MemoryKind > = Some ( memory:: MemoryKind :: MutStatic ) ;
282
+
281
283
/// Returns Ok() when the function was handled, fail otherwise
282
284
fn find_fn < ' a > (
283
285
ecx : & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
@@ -309,15 +311,6 @@ impl<'mir, 'tcx: 'mir> Machine<'mir, 'tcx> for Evaluator<'tcx> {
309
311
ecx. ptr_op ( bin_op, left, left_layout, right, right_layout)
310
312
}
311
313
312
- fn access_static_mut < ' a , ' m > (
313
- mem : & ' m mut Memory < ' a , ' mir , ' tcx , Self > ,
314
- id : AllocId ,
315
- ) -> EvalResult < ' tcx , & ' m mut Allocation > {
316
- // Make a copy, use that.
317
- mem. deep_copy_static ( id, MiriMemoryKind :: MutStatic . into ( ) ) ?;
318
- mem. get_mut ( id) // this is recursive, but now we know that `id` is in `alloc_map` now
319
- }
320
-
321
314
fn box_alloc < ' a > (
322
315
ecx : & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
323
316
dest : PlaceTy < ' tcx > ,
0 commit comments