From edf5dc66c1ec243bb2a60385b094cde719c0a492 Mon Sep 17 00:00:00 2001 From: Clar Charr Date: Wed, 8 Mar 2017 21:53:28 -0500 Subject: [PATCH] Box docs: no allocation is done for ZSTs. --- src/liballoc/boxed.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index d0fce70612868..43b0d72186a29 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -225,6 +225,8 @@ impl Drop for IntermediateBox { impl Box { /// Allocates memory on the heap and then places `x` into it. /// + /// This doesn't actually allocate if `T` is zero-sized. + /// /// # Examples /// /// ```