Use #[rustc_box] in alloc instead of box syntax
This commit is contained in:
parent
cfc21deebd
commit
535e28b6c6
4 changed files with 56 additions and 9 deletions
|
@ -2983,12 +2983,15 @@ impl<T, const N: usize> From<[T; N]> for Vec<T> {
|
|||
/// ```
|
||||
#[cfg(not(test))]
|
||||
fn from(s: [T; N]) -> Vec<T> {
|
||||
<[T]>::into_vec(box s)
|
||||
<[T]>::into_vec(
|
||||
#[cfg_attr(not(bootstrap), rustc_box)]
|
||||
Box::new(s),
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn from(s: [T; N]) -> Vec<T> {
|
||||
crate::slice::into_vec(box s)
|
||||
crate::slice::into_vec(Box::new(s))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue