We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Into<Box<[T]>> for Vec<T>
From<Vec<T>> for Box<[T]>
1 parent dfb8c80 commit 222a328Copy full SHA for 222a328
src/liballoc/vec.rs
@@ -2124,10 +2124,12 @@ impl<T> From<Box<[T]>> for Vec<T> {
2124
}
2125
2126
2127
-#[stable(feature = "box_from_vec", since = "1.18.0")]
2128
-impl<T> Into<Box<[T]>> for Vec<T> {
2129
- fn into(self) -> Box<[T]> {
2130
- self.into_boxed_slice()
+// note: test pulls in libstd, which causes errors here
+#[cfg(not(test))]
+#[stable(feature = "box_from_vec", since = "1.20.0")]
+impl<T> From<Vec<T>> for Box<[T]> {
2131
+ fn from(v: Vec<T>) -> Box<[T]> {
2132
+ v.into_boxed_slice()
2133
2134
2135
0 commit comments