@@ -4,7 +4,7 @@ use crate::rustc::mir::interpret::{
4
4
read_target_uint, AllocId , AllocType , Allocation , ConstValue , EvalResult , GlobalId , Scalar ,
5
5
} ;
6
6
use crate :: rustc:: ty:: Const ;
7
- use crate :: rustc_mir:: interpret:: { EvalContext , Machine , Memory , MemoryKind , OpTy , PlaceTy } ;
7
+ use crate :: rustc_mir:: interpret:: { EvalContext , Machine , Memory , MemoryKind , OpTy , PlaceTy , Pointer } ;
8
8
use std:: borrow:: Cow ;
9
9
10
10
#[ derive( Default ) ]
@@ -127,7 +127,6 @@ fn trans_const_place<'a, 'tcx: 'a>(
127
127
fx. tcx . at ( DUMMY_SP ) ,
128
128
ty:: ParamEnv :: reveal_all ( ) ,
129
129
TransPlaceInterpreter ,
130
- ( ) ,
131
130
) ;
132
131
let op = ecx. const_to_op ( const_) ?;
133
132
let ptr = ecx. allocate ( op. layout , MemoryKind :: Stack ) ?;
@@ -188,7 +187,7 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
188
187
module : & mut Module < B > ,
189
188
cx : & mut ConstantCx ,
190
189
) {
191
- let memory = Memory :: < TransPlaceInterpreter > :: new ( tcx. at ( DUMMY_SP ) , ( ) ) ;
190
+ let memory = Memory :: < TransPlaceInterpreter > :: new ( tcx. at ( DUMMY_SP ) ) ;
192
191
193
192
while let Some ( todo_item) = pop_set ( & mut cx. todo ) {
194
193
let ( data_id, alloc) = match todo_item {
@@ -278,11 +277,12 @@ fn pop_set<T: Copy + Eq + ::std::hash::Hash>(set: &mut HashSet<T>) -> Option<T>
278
277
struct TransPlaceInterpreter ;
279
278
280
279
impl < ' a , ' mir , ' tcx > Machine < ' a , ' mir , ' tcx > for TransPlaceInterpreter {
281
- type MemoryData = ( ) ;
282
- type MemoryKinds = ( ) ;
283
- type MemoryMap = FxHashMap < AllocId , ( MemoryKind < ( ) > , Allocation < ( ) > ) > ;
280
+ type MemoryKinds = !;
284
281
type PointerTag = ( ) ;
285
- const STATIC_KIND : Option < ( ) > = None ;
282
+ type AllocExtra = ( ) ;
283
+ type MemoryMap = FxHashMap < AllocId , ( MemoryKind < !> , Allocation < ( ) > ) > ;
284
+ const STATIC_KIND : Option < !> = None ;
285
+ const ENABLE_PTR_TRACKING_HOOKS : bool = false ;
286
286
287
287
fn enforce_validity ( _: & EvalContext < ' a , ' mir , ' tcx , Self > ) -> bool {
288
288
false
@@ -336,4 +336,12 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
336
336
fn box_alloc ( _: & mut EvalContext < ' a , ' mir , ' tcx , Self > , _: PlaceTy < ' tcx > ) -> EvalResult < ' tcx > {
337
337
panic ! ( ) ;
338
338
}
339
+
340
+ fn tag_reference ( _: & mut EvalContext < ' a , ' mir , ' tcx , Self > , _: Pointer < ( ) > , _: Ty < ' tcx > , _: Size , _: Option < BorrowKind > ) -> EvalResult < ' tcx > {
341
+ panic ! ( ) ;
342
+ }
343
+
344
+ fn tag_dereference ( _: & EvalContext < ' a , ' mir , ' tcx , Self > , _: Pointer < ( ) > , _: Ty < ' tcx > ) -> EvalResult < ' tcx > {
345
+ panic ! ( ) ;
346
+ }
339
347
}
0 commit comments