@@ -135,9 +135,9 @@ pub enum MiriMemoryKind {
135135 Mmap ,
136136}
137137
138- impl From < MiriMemoryKind > for MemoryKind < MiriMemoryKind > {
138+ impl From < MiriMemoryKind > for MemoryKind {
139139 #[ inline( always) ]
140- fn from ( kind : MiriMemoryKind ) -> MemoryKind < MiriMemoryKind > {
140+ fn from ( kind : MiriMemoryKind ) -> MemoryKind {
141141 MemoryKind :: Machine ( kind)
142142 }
143143}
@@ -185,6 +185,8 @@ impl fmt::Display for MiriMemoryKind {
185185 }
186186}
187187
188+ pub type MemoryKind = interpret:: MemoryKind < MiriMemoryKind > ;
189+
188190/// Pointer provenance.
189191#[ derive( Clone , Copy ) ]
190192pub enum Provenance {
@@ -863,10 +865,8 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
863865 type ProvenanceExtra = ProvenanceExtra ;
864866 type Bytes = Box < [ u8 ] > ;
865867
866- type MemoryMap = MonoHashMap <
867- AllocId ,
868- ( MemoryKind < MiriMemoryKind > , Allocation < Provenance , Self :: AllocExtra , Self :: Bytes > ) ,
869- > ;
868+ type MemoryMap =
869+ MonoHashMap < AllocId , ( MemoryKind , Allocation < Provenance , Self :: AllocExtra , Self :: Bytes > ) > ;
870870
871871 const GLOBAL_KIND : Option < MiriMemoryKind > = Some ( MiriMemoryKind :: Global ) ;
872872
@@ -1088,7 +1088,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
10881088 ecx : & MiriInterpCx < ' mir , ' tcx > ,
10891089 id : AllocId ,
10901090 alloc : Cow < ' b , Allocation > ,
1091- kind : Option < MemoryKind < Self :: MemoryKind > > ,
1091+ kind : Option < MemoryKind > ,
10921092 ) -> InterpResult < ' tcx , Cow < ' b , Allocation < Self :: Provenance , Self :: AllocExtra > > > {
10931093 let kind = kind. expect ( "we set our STATIC_KIND so this cannot be None" ) ;
10941094 if ecx. machine . tracked_alloc_ids . contains ( & id) {
@@ -1280,6 +1280,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
12801280 ( alloc_id, prove_extra) : ( AllocId , Self :: ProvenanceExtra ) ,
12811281 size : Size ,
12821282 align : Align ,
1283+ _kind : MemoryKind ,
12831284 ) -> InterpResult < ' tcx > {
12841285 if machine. tracked_alloc_ids . contains ( & alloc_id) {
12851286 machine. emit_diagnostic ( NonHaltingDiagnostic :: FreedAlloc ( alloc_id) ) ;
0 commit comments