Skip to content

Commit fe921ed

Browse files
committed
Use Box::new instead of the box_new intrinsic in vec! expansion
1 parent ce55b20 commit fe921ed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

library/alloc/src/macros.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ macro_rules! vec {
4848
);
4949
($($x:expr),+ $(,)?) => (
5050
<[_]>::into_vec(
51-
// Using the intrinsic produces a dramatic improvement in compile
52-
// time when constructing arrays with many elements.
53-
$crate::boxed::box_new([$($x),+])
51+
$crate::boxed::Box::new([$($x),+])
5452
)
5553
);
5654
}

0 commit comments

Comments
 (0)