@@ -255,7 +255,7 @@ impl<'s> AllocDecodingSession<'s> {
255255 // We already have a reserved AllocId.
256256 let alloc_id = alloc_id. unwrap ( ) ;
257257 trace ! ( "decoded alloc {:?} {:#?}" , alloc_id, allocation) ;
258- decoder. tcx ( ) . alloc_map . lock ( ) . set_id_same_memory ( alloc_id, allocation) ;
258+ decoder. tcx ( ) . alloc_map . lock ( ) . set_alloc_id_same_memory ( alloc_id, allocation) ;
259259 Ok ( alloc_id)
260260 } ,
261261 AllocDiscriminant :: Fn => {
@@ -325,8 +325,8 @@ impl<'tcx> AllocMap<'tcx> {
325325 /// Obtains a new allocation ID that can be referenced but does not
326326 /// yet have an allocation backing it.
327327 ///
328- /// Make sure to call `set_id_memory ` or `set_id_same_memory ` before returning such an
329- /// `AllocId` from a query.
328+ /// Make sure to call `set_alloc_id_memory ` or `set_alloc_id_same_memory ` before returning such
329+ /// an `AllocId` from a query.
330330 pub fn reserve (
331331 & mut self ,
332332 ) -> AllocId {
@@ -390,21 +390,21 @@ impl<'tcx> AllocMap<'tcx> {
390390 // inside rustc?
391391 pub fn allocate ( & mut self , mem : & ' tcx Allocation ) -> AllocId {
392392 let id = self . reserve ( ) ;
393- self . set_id_memory ( id, mem) ;
393+ self . set_alloc_id_memory ( id, mem) ;
394394 id
395395 }
396396
397397 /// Freeze an `AllocId` created with `reserve` by pointing it at an `Allocation`. Trying to
398398 /// call this function twice, even with the same `Allocation` will ICE the compiler.
399- pub fn set_id_memory ( & mut self , id : AllocId , mem : & ' tcx Allocation ) {
399+ pub fn set_alloc_id_memory ( & mut self , id : AllocId , mem : & ' tcx Allocation ) {
400400 if let Some ( old) = self . id_to_kind . insert ( id, AllocKind :: Memory ( mem) ) {
401401 bug ! ( "tried to set allocation id {}, but it was already existing as {:#?}" , id, old) ;
402402 }
403403 }
404404
405405 /// Freeze an `AllocId` created with `reserve` by pointing it at an `Allocation`. May be called
406406 /// twice for the same `(AllocId, Allocation)` pair.
407- pub fn set_id_same_memory ( & mut self , id : AllocId , mem : & ' tcx Allocation ) {
407+ pub fn set_alloc_id_same_memory ( & mut self , id : AllocId , mem : & ' tcx Allocation ) {
408408 self . id_to_kind . insert_same ( id, AllocKind :: Memory ( mem) ) ;
409409 }
410410}
0 commit comments