]> git.lizzy.rs Git - rust.git/commitdiff
Don't invalidate one byte beyond the end
authorOliver Schneider <github35764891676564198441@oli-obk.de>
Wed, 30 May 2018 10:05:56 +0000 (12:05 +0200)
committerOliver Schneider <github35764891676564198441@oli-obk.de>
Thu, 31 May 2018 08:22:45 +0000 (10:22 +0200)
src/librustc_mir/interpret/memory.rs

index 912fc64d3429c8e6d8c39b470c98228bcde83f3d..387eeb64c46d0b178b502b56599c318960bb6f35 100644 (file)
@@ -844,7 +844,7 @@ fn clear_relocations(&mut self, ptr: Pointer, size: Size) -> EvalResult<'tcx> {
         }
 
         // Forget all the relocations.
-        alloc.relocations.remove_range(first ..= last);
+        alloc.relocations.remove_range(first .. last);
 
         Ok(())
     }