From fe921ed3f3cd6a328af76d1be1ab7b74b77e1857 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Sat, 11 Jan 2025 08:26:57 -0500 Subject: [PATCH] Use Box::new instead of the box_new intrinsic in vec! expansion --- library/alloc/src/macros.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs index 6ee3907cc8ea2..3ddf2905ab692 100644 --- a/library/alloc/src/macros.rs +++ b/library/alloc/src/macros.rs @@ -48,9 +48,7 @@ macro_rules! vec { ); ($($x:expr),+ $(,)?) => ( <[_]>::into_vec( - // Using the intrinsic produces a dramatic improvement in compile - // time when constructing arrays with many elements. - $crate::boxed::box_new([$($x),+]) + $crate::boxed::Box::new([$($x),+]) ) ); }