From f6d70b42b8d6d299fe5621ac9170f69c511c8ddc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 21 Oct 2019 11:08:37 +0200 Subject: [PATCH] remove write_repeat; it is subsumed by the new write_bytes --- src/librustc/mir/interpret/allocation.rs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs index 33c53323d96a..796d293e2c63 100644 --- a/src/librustc/mir/interpret/allocation.rs +++ b/src/librustc/mir/interpret/allocation.rs @@ -367,25 +367,6 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra> Allocation { Ok(()) } - /// Sets `count` bytes starting at `ptr.offset` with `val`. Basically `memset`. - /// - /// It is the caller's responsibility to check bounds and alignment beforehand. - /// Most likely, you want to call `Memory::write_bytes` instead of this method. - pub fn write_repeat( - &mut self, - cx: &impl HasDataLayout, - ptr: Pointer, - val: u8, - count: Size - ) -> InterpResult<'tcx> - { - let bytes = self.get_bytes_mut(cx, ptr, count)?; - for b in bytes { - *b = val; - } - Ok(()) - } - /// Reads a *non-ZST* scalar. /// /// ZSTs can't be read for two reasons: