summaryrefslogtreecommitdiffstats
path: root/library/alloc/src/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/src/macros.rs')
-rw-r--r--library/alloc/src/macros.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs
index 5198bf297..4c6ae8f25 100644
--- a/library/alloc/src/macros.rs
+++ b/library/alloc/src/macros.rs
@@ -48,6 +48,8 @@ macro_rules! vec {
);
($($x:expr),+ $(,)?) => (
$crate::__rust_force_expr!(<[_]>::into_vec(
+ // This rustc_box is not required, but it produces a dramatic improvement in compile
+ // time when constructing arrays with many elements.
#[rustc_box]
$crate::boxed::Box::new([$($x),+])
))