]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/match-vec-unreachable.rs
test: Remove all uses of `~str` from the test suite.
[rust.git] / src / test / compile-fail / match-vec-unreachable.rs
index 2e3b5e399f195b72968e6d7f6adffd45a70ba1ad..128c25889d87b578a043233868052595779b3eac 100644 (file)
@@ -18,8 +18,10 @@ fn main() {
         _ => ()
     }
 
-    let x: Vec<~str> = vec!("foo".to_owned(), "bar".to_owned(), "baz".to_owned());
-    let x: &[~str] = x.as_slice();
+    let x: Vec<StrBuf> = vec!["foo".to_strbuf(),
+                              "bar".to_strbuf(),
+                              "baz".to_strbuf()];
+    let x: &[StrBuf] = x.as_slice();
     match x {
         [a, _, _, ..] => { println!("{}", a); }
         [_, _, _, _, _] => { } //~ ERROR unreachable pattern