Skip to content

Commit

Permalink
Use Box::new instead of the box_new intrinsic in vec! expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Jan 11, 2025
1 parent ce55b20 commit fe921ed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions library/alloc/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),+])
)
);
}
Expand Down

0 comments on commit fe921ed

Please sign in to comment.