@@ -239,12 +239,11 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
239
239
cx : & impl HasDataLayout ,
240
240
ptr : Pointer < Tag > ,
241
241
size : Size ,
242
- msg : CheckInAllocMsg ,
243
242
) -> EvalResult < ' tcx , & [ u8 ] >
244
243
// FIXME: Working around https://github.com/rust-lang/rust/issues/56209
245
244
where Extra : AllocationExtra < Tag , MemoryExtra >
246
245
{
247
- self . get_bytes_internal ( cx, ptr, size, false , msg )
246
+ self . get_bytes_internal ( cx, ptr, size, false , CheckInAllocMsg :: MemoryAccess )
248
247
}
249
248
250
249
/// Just calling this already marks everything as defined and removes relocations,
@@ -254,13 +253,12 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
254
253
cx : & impl HasDataLayout ,
255
254
ptr : Pointer < Tag > ,
256
255
size : Size ,
257
- msg : CheckInAllocMsg ,
258
256
) -> EvalResult < ' tcx , & mut [ u8 ] >
259
257
// FIXME: Working around https://github.com/rust-lang/rust/issues/56209
260
258
where Extra : AllocationExtra < Tag , MemoryExtra >
261
259
{
262
260
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 ) ?;
264
262
265
263
self . mark_definedness ( ptr, size, true ) ?;
266
264
self . clear_relocations ( cx, ptr, size) ?;
@@ -314,7 +312,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
314
312
where Extra : AllocationExtra < Tag , MemoryExtra >
315
313
{
316
314
// 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) ?;
318
316
// Check undef and ptr
319
317
if !allow_ptr_and_undef {
320
318
self . check_defined ( ptr, size) ?;
@@ -335,8 +333,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
335
333
// FIXME: Working around https://github.com/rust-lang/rust/issues/56209
336
334
where Extra : AllocationExtra < Tag , MemoryExtra >
337
335
{
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 ) ) ?;
340
337
bytes. clone_from_slice ( src) ;
341
338
Ok ( ( ) )
342
339
}
@@ -352,7 +349,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
352
349
// FIXME: Working around https://github.com/rust-lang/rust/issues/56209
353
350
where Extra : AllocationExtra < Tag , MemoryExtra >
354
351
{
355
- let bytes = self . get_bytes_mut ( cx, ptr, count, CheckInAllocMsg :: MemoryAccess ) ?;
352
+ let bytes = self . get_bytes_mut ( cx, ptr, count) ?;
356
353
for b in bytes {
357
354
* b = val;
358
355
}
@@ -377,8 +374,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
377
374
where Extra : AllocationExtra < Tag , MemoryExtra >
378
375
{
379
376
// 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) ?;
382
378
// Undef check happens *after* we established that the alignment is correct.
383
379
// We must not return Ok() for unaligned pointers!
384
380
if self . check_defined ( ptr, size) . is_err ( ) {
@@ -455,7 +451,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
455
451
} ;
456
452
457
453
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) ?;
459
455
write_target_uint ( endian, dst, bytes) . unwrap ( ) ;
460
456
461
457
// See if we have to also write a relocation
0 commit comments