Skip to content

Commit edf5dc6

Browse files
author
Clar Charr
committed
Box docs: no allocation is done for ZSTs.
1 parent ee60afa commit edf5dc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/liballoc/boxed.rs

+2
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ impl<T: ?Sized> Drop for IntermediateBox<T> {
225225
impl<T> Box<T> {
226226
/// Allocates memory on the heap and then places `x` into it.
227227
///
228+
/// This doesn't actually allocate if `T` is zero-sized.
229+
///
228230
/// # Examples
229231
///
230232
/// ```

0 commit comments

Comments
 (0)