@@ -266,7 +266,7 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
266
266
let range = self . check_bounds ( ptr. offset , size) ;
267
267
268
268
self . mark_init ( ptr, size, true ) ;
269
- self . clear_relocations ( cx, ptr, size) ? ;
269
+ self . clear_relocations ( cx, ptr, size) ;
270
270
271
271
AllocationExtra :: memory_written ( self , ptr, size) ?;
272
272
@@ -484,18 +484,13 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
484
484
/// uninitialized. This is a somewhat odd "spooky action at a distance",
485
485
/// but it allows strictly more code to run than if we would just error
486
486
/// immediately in that case.
487
- fn clear_relocations (
488
- & mut self ,
489
- cx : & impl HasDataLayout ,
490
- ptr : Pointer < Tag > ,
491
- size : Size ,
492
- ) -> InterpResult < ' tcx > {
487
+ fn clear_relocations ( & mut self , cx : & impl HasDataLayout , ptr : Pointer < Tag > , size : Size ) {
493
488
// Find the start and end of the given range and its outermost relocations.
494
489
let ( first, last) = {
495
490
// Find all relocations overlapping the given range.
496
491
let relocations = self . get_relocations ( cx, ptr, size) ;
497
492
if relocations. is_empty ( ) {
498
- return Ok ( ( ) ) ;
493
+ return ;
499
494
}
500
495
501
496
(
@@ -517,8 +512,6 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
517
512
518
513
// Forget all the relocations.
519
514
self . relocations . remove_range ( first..last) ;
520
-
521
- Ok ( ( ) )
522
515
}
523
516
524
517
/// Errors if there are relocations overlapping with the edges of the
0 commit comments