Skip to content

Commit f6d70b4

Browse files
committed
remove write_repeat; it is subsumed by the new write_bytes
1 parent d4b3654 commit f6d70b4

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/librustc/mir/interpret/allocation.rs

-19
Original file line numberDiff line numberDiff line change
@@ -367,25 +367,6 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
367367
Ok(())
368368
}
369369

370-
/// Sets `count` bytes starting at `ptr.offset` with `val`. Basically `memset`.
371-
///
372-
/// It is the caller's responsibility to check bounds and alignment beforehand.
373-
/// Most likely, you want to call `Memory::write_bytes` instead of this method.
374-
pub fn write_repeat(
375-
&mut self,
376-
cx: &impl HasDataLayout,
377-
ptr: Pointer<Tag>,
378-
val: u8,
379-
count: Size
380-
) -> InterpResult<'tcx>
381-
{
382-
let bytes = self.get_bytes_mut(cx, ptr, count)?;
383-
for b in bytes {
384-
*b = val;
385-
}
386-
Ok(())
387-
}
388-
389370
/// Reads a *non-ZST* scalar.
390371
///
391372
/// ZSTs can't be read for two reasons:

0 commit comments

Comments
 (0)