@@ -255,7 +255,7 @@ impl<'s> AllocDecodingSession<'s> {
255
255
// We already have a reserved AllocId.
256
256
let alloc_id = alloc_id. unwrap ( ) ;
257
257
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) ;
259
259
Ok ( alloc_id)
260
260
} ,
261
261
AllocDiscriminant :: Fn => {
@@ -325,8 +325,8 @@ impl<'tcx> AllocMap<'tcx> {
325
325
/// Obtains a new allocation ID that can be referenced but does not
326
326
/// yet have an allocation backing it.
327
327
///
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.
330
330
pub fn reserve (
331
331
& mut self ,
332
332
) -> AllocId {
@@ -390,21 +390,21 @@ impl<'tcx> AllocMap<'tcx> {
390
390
// inside rustc?
391
391
pub fn allocate ( & mut self , mem : & ' tcx Allocation ) -> AllocId {
392
392
let id = self . reserve ( ) ;
393
- self . set_id_memory ( id, mem) ;
393
+ self . set_alloc_id_memory ( id, mem) ;
394
394
id
395
395
}
396
396
397
397
/// Freeze an `AllocId` created with `reserve` by pointing it at an `Allocation`. Trying to
398
398
/// 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 ) {
400
400
if let Some ( old) = self . id_to_kind . insert ( id, AllocKind :: Memory ( mem) ) {
401
401
bug ! ( "tried to set allocation id {}, but it was already existing as {:#?}" , id, old) ;
402
402
}
403
403
}
404
404
405
405
/// Freeze an `AllocId` created with `reserve` by pointing it at an `Allocation`. May be called
406
406
/// 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 ) {
408
408
self . id_to_kind . insert_same ( id, AllocKind :: Memory ( mem) ) ;
409
409
}
410
410
}
0 commit comments