Skip to content

Commit 93d9832

Browse files
authored
Revert missing "memory block"
1 parent 929e37d commit 93d9832

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/alloc/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub unsafe trait AllocRef {
128128
/// [`handle_alloc_error`]: ../../alloc/alloc/fn.handle_alloc_error.html
129129
fn alloc_zeroed(&mut self, layout: Layout) -> Result<NonNull<[u8]>, AllocErr> {
130130
let ptr = self.alloc(layout)?;
131-
// SAFETY: `alloc` returns a valid memory slice
131+
// SAFETY: `alloc` returns a valid memory block
132132
unsafe { ptr.as_non_null_ptr().as_ptr().write_bytes(0, ptr.len()) }
133133
Ok(ptr)
134134
}

0 commit comments

Comments
 (0)