about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOzaren <krishna.sd.2012@gmail.com>2018-12-19 00:19:07 -0500
committerOzaren <krishna.sd.2012@gmail.com>2018-12-19 00:19:07 -0500
commit7dd078f53f4e1817207b089fb08d6a00121ca05b (patch)
treeaaadc77d8c5eaf60ef476cc5c66b523f7d0b979a
parentdb9fe1c86ea3c45a459f2ff63db2aef658ee3b7f (diff)
downloadrust-7dd078f53f4e1817207b089fb08d6a00121ca05b.tar.gz
rust-7dd078f53f4e1817207b089fb08d6a00121ca05b.zip
fixed test, now it doesn't use a fundemental type
i.e. `Box`, instead it now uses `Vec`
-rw-r--r--src/test/run-pass/try_from.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/run-pass/try_from.rs b/src/test/run-pass/try_from.rs
index 3f2eb98f861..767c2b91471 100644
--- a/src/test/run-pass/try_from.rs
+++ b/src/test/run-pass/try_from.rs
@@ -32,12 +32,13 @@ impl<T> From<Foo<T>> for Box<T> {
 }
 */
 
-impl<T> Into<Box<T>> for Foo<T> {
-    fn into(self) -> Box<T> {
-        Box::new(self.t)
+impl<T> Into<Vec<T>> for Foo<T> {
+    fn into(self) -> Vec<T> {
+        vec![self.t]
     }
 }
 
 pub fn main() {
-    let _: Result<Box<i32>, !> = Foo { t: 10 }.try_into();
+    let _: Result<Vec<i32>, !> = Foo { t: 10 }.try_into();
 }
+