diff options
Diffstat (limited to 'src/liballoc/vec.rs')
| -rw-r--r-- | src/liballoc/vec.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index f557d056dc8..8fede31847c 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -2398,7 +2398,10 @@ impl<T: Clone> From<&mut [T]> for Vec<T> { } #[stable(feature = "vec_from_array", since = "1.42.0")] -impl<T, const N: usize> From<[T; N]> for Vec<T> { +impl<T, const N: usize> From<[T; N]> for Vec<T> +where + [T; N]: LengthAtMost32, +{ fn from(arr: [T; N]) -> Self { <[T]>::into_vec(box arr) } |
