Skip to content

Commit f267d9d

Browse files
jyn514Centril
andcommitted
limit From impl to LengthAtMost32
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
1 parent daeb8ec commit f267d9d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/liballoc/vec.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2398,7 +2398,10 @@ impl<T: Clone> From<&mut [T]> for Vec<T> {
23982398
}
23992399

24002400
#[stable(feature = "vec_from_array", since = "1.42.0")]
2401-
impl<T, const N: usize> From<[T; N]> for Vec<T> {
2401+
impl<T, const N: usize> From<[T; N]> for Vec<T>
2402+
where
2403+
[T; N]: LengthAtMost32,
2404+
{
24022405
fn from(arr: [T; N]) -> Self {
24032406
<[T]>::into_vec(box arr)
24042407
}

0 commit comments

Comments
 (0)