]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/match-pipe-binding.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / run-pass / match-pipe-binding.rs
index b4933773c03e25b41bb8acdd4ff08b5f1ff6c304..4a5874536cfb473ec3cca1c8e424c3c7d48418ff 100644 (file)
 
 fn test1() {
     // from issue 6338
-    match ((1, ~"a"), (2, ~"b")) {
+    match ((1, "a".to_owned()), (2, "b".to_owned())) {
         ((1, a), (2, b)) | ((2, b), (1, a)) => {
-                assert_eq!(a, ~"a");
-                assert_eq!(b, ~"b");
+                assert_eq!(a, "a".to_owned());
+                assert_eq!(b, "b".to_owned());
             },
             _ => fail!(),
     }
@@ -59,7 +59,7 @@ fn test5() {
     }
 }
 
-fn main() {
+pub fn main() {
     test1();
     test2();
     test3();