about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorClar Charr <clar@charr.xyz>2017-03-08 21:53:28 -0500
committerClar Charr <clar@charr.xyz>2017-03-08 21:53:28 -0500
commitedf5dc66c1ec243bb2a60385b094cde719c0a492 (patch)
tree94cd7a942b0ed85776ccc04e4ce5c6460b14fed3 /src/liballoc
parentee60afa09465cedfa08be04e59b6a8ccfd54685f (diff)
downloadrust-edf5dc66c1ec243bb2a60385b094cde719c0a492.tar.gz
rust-edf5dc66c1ec243bb2a60385b094cde719c0a492.zip
Box docs: no allocation is done for ZSTs.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index d0fce706128..43b0d72186a 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -225,6 +225,8 @@ impl<T: ?Sized> Drop for IntermediateBox<T> {
 impl<T> Box<T> {
     /// Allocates memory on the heap and then places `x` into it.
     ///
+    /// This doesn't actually allocate if `T` is zero-sized.
+    ///
     /// # Examples
     ///
     /// ```