about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-10-21 11:08:37 +0200
committerRalf Jung <post@ralfj.de>2019-10-21 11:08:37 +0200
commitf6d70b42b8d6d299fe5621ac9170f69c511c8ddc (patch)
tree9ede4e6becc314759e8f1f1d4400e15a61e94e12 /src
parentd4b365429ddaeb18b42ff47456bd9865fd1d732e (diff)
downloadrust-f6d70b42b8d6d299fe5621ac9170f69c511c8ddc.tar.gz
rust-f6d70b42b8d6d299fe5621ac9170f69c511c8ddc.zip
remove write_repeat; it is subsumed by the new write_bytes
Diffstat (limited to 'src')
-rw-r--r--src/librustc/mir/interpret/allocation.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs
index 33c53323d96..796d293e2c6 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<Tag>> Allocation<Tag, Extra> {
         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<Tag>,
-        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: