about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2025-01-11 08:26:57 -0500
committerBen Kimock <kimockb@gmail.com>2025-01-12 13:17:16 -0500
commit6024a06dbad00a71e687d1709dc0d4e1b42d3c2e (patch)
treed600701d9f0407d5588934e46c838990415d27fb
parent7bb98889534d597911263d647424557b414770ec (diff)
downloadrust-6024a06dbad00a71e687d1709dc0d4e1b42d3c2e.tar.gz
rust-6024a06dbad00a71e687d1709dc0d4e1b42d3c2e.zip
Update the explanation for why we use box_new in vec!
-rw-r--r--library/alloc/src/macros.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs
index 6ee3907cc8e..c000fd6f4ef 100644
--- a/library/alloc/src/macros.rs
+++ b/library/alloc/src/macros.rs
@@ -48,8 +48,8 @@ macro_rules! vec {
     );
     ($($x:expr),+ $(,)?) => (
         <[_]>::into_vec(
-            // Using the intrinsic produces a dramatic improvement in compile
-            // time when constructing arrays with many elements.
+            // Using the intrinsic produces a dramatic improvement in stack usage for
+            // unoptimized programs using this code path to construct large Vecs.
             $crate::boxed::box_new([$($x),+])
         )
     );