@@ -239,12 +239,11 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
239239 cx : & impl HasDataLayout ,
240240 ptr : Pointer < Tag > ,
241241 size : Size ,
242- msg : CheckInAllocMsg ,
243242 ) -> EvalResult < ' tcx , & [ u8 ] >
244243 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
245244 where Extra : AllocationExtra < Tag , MemoryExtra >
246245 {
247- self . get_bytes_internal ( cx, ptr, size, false , msg )
246+ self . get_bytes_internal ( cx, ptr, size, false , CheckInAllocMsg :: MemoryAccess )
248247 }
249248
250249 /// Just calling this already marks everything as defined and removes relocations,
@@ -254,13 +253,12 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
254253 cx : & impl HasDataLayout ,
255254 ptr : Pointer < Tag > ,
256255 size : Size ,
257- msg : CheckInAllocMsg ,
258256 ) -> EvalResult < ' tcx , & mut [ u8 ] >
259257 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
260258 where Extra : AllocationExtra < Tag , MemoryExtra >
261259 {
262260 assert_ne ! ( size. bytes( ) , 0 , "0-sized accesses should never even get a `Pointer`" ) ;
263- self . check_bounds ( cx, ptr, size, msg ) ?;
261+ self . check_bounds ( cx, ptr, size, CheckInAllocMsg :: MemoryAccess ) ?;
264262
265263 self . mark_definedness ( ptr, size, true ) ?;
266264 self . clear_relocations ( cx, ptr, size) ?;
@@ -314,7 +312,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
314312 where Extra : AllocationExtra < Tag , MemoryExtra >
315313 {
316314 // Check bounds and relocations on the edges
317- self . get_bytes_with_undef_and_ptr ( cx, ptr, size, CheckInAllocMsg :: OutOfBounds ) ?;
315+ self . get_bytes_with_undef_and_ptr ( cx, ptr, size) ?;
318316 // Check undef and ptr
319317 if !allow_ptr_and_undef {
320318 self . check_defined ( ptr, size) ?;
@@ -335,8 +333,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
335333 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
336334 where Extra : AllocationExtra < Tag , MemoryExtra >
337335 {
338- let bytes = self . get_bytes_mut ( cx, ptr, Size :: from_bytes ( src. len ( ) as u64 ) ,
339- CheckInAllocMsg :: MemoryAccess ) ?;
336+ let bytes = self . get_bytes_mut ( cx, ptr, Size :: from_bytes ( src. len ( ) as u64 ) ) ?;
340337 bytes. clone_from_slice ( src) ;
341338 Ok ( ( ) )
342339 }
@@ -352,7 +349,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
352349 // FIXME: Working around https://github.com/rust-lang/rust/issues/56209
353350 where Extra : AllocationExtra < Tag , MemoryExtra >
354351 {
355- let bytes = self . get_bytes_mut ( cx, ptr, count, CheckInAllocMsg :: MemoryAccess ) ?;
352+ let bytes = self . get_bytes_mut ( cx, ptr, count) ?;
356353 for b in bytes {
357354 * b = val;
358355 }
@@ -377,8 +374,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
377374 where Extra : AllocationExtra < Tag , MemoryExtra >
378375 {
379376 // get_bytes_unchecked tests relocation edges
380- let bytes = self . get_bytes_with_undef_and_ptr ( cx, ptr, size,
381- CheckInAllocMsg :: MemoryAccess ) ?;
377+ let bytes = self . get_bytes_with_undef_and_ptr ( cx, ptr, size) ?;
382378 // Undef check happens *after* we established that the alignment is correct.
383379 // We must not return Ok() for unaligned pointers!
384380 if self . check_defined ( ptr, size) . is_err ( ) {
@@ -455,7 +451,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
455451 } ;
456452
457453 let endian = cx. data_layout ( ) . endian ;
458- let dst = self . get_bytes_mut ( cx, ptr, type_size, CheckInAllocMsg :: MemoryAccess ) ?;
454+ let dst = self . get_bytes_mut ( cx, ptr, type_size) ?;
459455 write_target_uint ( endian, dst, bytes) . unwrap ( ) ;
460456
461457 // See if we have to also write a relocation
0 commit comments