]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-9382.rs
test: Make manual changes to deal with the fallout from removal of
[rust.git] / src / test / run-pass / issue-9382.rs
index 6926018bafa09b8065c4859801b03600ee646d2f..32ec1e674db7f9449aa9f263d600a858b1d19ad2 100644 (file)
@@ -16,6 +16,8 @@
 // from a vector to a slice. The drop glue was being invoked on
 // the temporary slice with a wrong type, triggering an LLVM assert.
 
+use std::vec_ng::Vec;
+
 struct Thing1<'a> {
     baz: &'a [~int],
     bar: ~u64,
@@ -32,7 +34,7 @@ pub fn main() {
         bar: ~32,
     };
     Thing1 {
-        baz: Vec::new(),
+        baz: Vec::new().as_slice(),
         bar: ~32,
     };
     let _t2_fixed = Thing2 {
@@ -40,7 +42,7 @@ pub fn main() {
         bar: 32,
     };
     Thing2 {
-        baz: Vec::new(),
+        baz: Vec::new().as_slice(),
         bar: 32,
     };
 }