Skip to content

Commit

Permalink
Update the explanation for why we use box_new in vec!
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin authored and gitbot committed Feb 21, 2025
1 parent 03935e7 commit fe38adb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alloc/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),+])
)
);
Expand Down

0 comments on commit fe38adb

Please sign in to comment.