@@ -103,7 +103,7 @@ pub fn specialized_encode_alloc_id<
103103 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
104104 alloc_id : AllocId ,
105105) -> Result < ( ) , E :: Error > {
106- let alloc_type: AllocType < ' tcx , & ' tcx Allocation > =
106+ let alloc_type: AllocType < ' tcx > =
107107 tcx. alloc_map . lock ( ) . get ( alloc_id) . expect ( "no value for AllocId" ) ;
108108 match alloc_type {
109109 AllocType :: Memory ( alloc) => {
@@ -291,22 +291,22 @@ impl fmt::Display for AllocId {
291291}
292292
293293#[ derive( Debug , Clone , Eq , PartialEq , Hash , RustcDecodable , RustcEncodable ) ]
294- pub enum AllocType < ' tcx , M > {
294+ pub enum AllocType < ' tcx > {
295295 /// The alloc id is used as a function pointer
296296 Function ( Instance < ' tcx > ) ,
297297 /// The alloc id points to a "lazy" static variable that did not get computed (yet).
298298 /// This is also used to break the cycle in recursive statics.
299299 Static ( DefId ) ,
300300 /// The alloc id points to memory
301- Memory ( M )
301+ Memory ( & ' tcx Allocation ) ,
302302}
303303
304304pub struct AllocMap < ' tcx > {
305305 /// Lets you know what an AllocId refers to
306- id_to_type : FxHashMap < AllocId , AllocType < ' tcx , & ' tcx Allocation > > ,
306+ id_to_type : FxHashMap < AllocId , AllocType < ' tcx > > ,
307307
308308 /// Used to ensure that functions and statics only get one associated AllocId
309- type_interner : FxHashMap < AllocType < ' tcx , & ' tcx Allocation > , AllocId > ,
309+ type_interner : FxHashMap < AllocType < ' tcx > , AllocId > ,
310310
311311 /// The AllocId to assign to the next requested id.
312312 /// Always incremented, never gets smaller.
@@ -336,7 +336,7 @@ impl<'tcx> AllocMap<'tcx> {
336336 next
337337 }
338338
339- fn intern ( & mut self , alloc_type : AllocType < ' tcx , & ' tcx Allocation > ) -> AllocId {
339+ fn intern ( & mut self , alloc_type : AllocType < ' tcx > ) -> AllocId {
340340 if let Some ( & alloc_id) = self . type_interner . get ( & alloc_type) {
341341 return alloc_id;
342342 }
@@ -354,7 +354,7 @@ impl<'tcx> AllocMap<'tcx> {
354354 self . intern ( AllocType :: Function ( instance) )
355355 }
356356
357- pub fn get ( & self , id : AllocId ) -> Option < AllocType < ' tcx , & ' tcx Allocation > > {
357+ pub fn get ( & self , id : AllocId ) -> Option < AllocType < ' tcx > > {
358358 self . id_to_type . get ( & id) . cloned ( )
359359 }
360360
0 commit comments