@@ -247,7 +247,7 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
247
247
assert_ne ! ( size. bytes( ) , 0 , "0-sized accesses should never even get a `Pointer`" ) ;
248
248
self . check_bounds ( cx, ptr, size, CheckInAllocMsg :: MemoryAccessTest ) ?;
249
249
250
- self . mark_definedness ( ptr, size, true ) ? ;
250
+ self . mark_definedness ( ptr, size, true ) ;
251
251
self . clear_relocations ( cx, ptr, size) ?;
252
252
253
253
AllocationExtra :: memory_written ( self , ptr, size) ?;
@@ -406,7 +406,10 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
406
406
{
407
407
let val = match val {
408
408
ScalarMaybeUndef :: Scalar ( scalar) => scalar,
409
- ScalarMaybeUndef :: Undef => return self . mark_definedness ( ptr, type_size, false ) ,
409
+ ScalarMaybeUndef :: Undef => {
410
+ self . mark_definedness ( ptr, type_size, false ) ;
411
+ return Ok ( ( ) ) ;
412
+ } ,
410
413
} ;
411
414
412
415
let bytes = match val. to_bits_or_ptr ( type_size, cx) {
@@ -550,16 +553,15 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
550
553
ptr : Pointer < Tag > ,
551
554
size : Size ,
552
555
new_state : bool ,
553
- ) -> InterpResult < ' tcx > {
556
+ ) {
554
557
if size. bytes ( ) == 0 {
555
- return Ok ( ( ) ) ;
558
+ return ;
556
559
}
557
560
self . undef_mask . set_range (
558
561
ptr. offset ,
559
562
ptr. offset + size,
560
563
new_state,
561
564
) ;
562
- Ok ( ( ) )
563
565
}
564
566
}
565
567
0 commit comments