mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 11:17:26 +03:00
Update the explanation for why we use box_new in vec!
This commit is contained in:
@@ -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),+])
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user