Update the explanation for why we use box_new in vec!

This commit is contained in:
Ben Kimock 2025-01-11 08:26:57 -05:00
parent 7bb9888953
commit 6024a06dba

View file

@ -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),+])
)
);