]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass-fulldeps/qquote.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / run-pass-fulldeps / qquote.rs
index 1def436b4de0184a40fe0672b92bb5e6d991ae72..3b3e4066e0ccd48cda9565faec154d0a977b6a88 100644 (file)
@@ -57,20 +57,20 @@ fn main() {
     let cx = mk_ctxt();
 
     let abc = quote_expr!(cx, 23);
-    check_pp(ext_cx, abc,  pprust::print_expr, ~"23");
+    check_pp(ext_cx, abc,  pprust::print_expr, "23".to_owned());
 
 
     let ty = quote_ty!(cx, int);
-    check_pp(ext_cx, ty, pprust::print_type, ~"int");
+    check_pp(ext_cx, ty, pprust::print_type, "int".to_owned());
 
     let item = quote_item!(cx, static x : int = 10;).get();
-    check_pp(ext_cx, item, pprust::print_item, ~"static x: int = 10;");
+    check_pp(ext_cx, item, pprust::print_item, "static x: int = 10;".to_owned());
 
     let stmt = quote_stmt!(cx, let x = 20;);
-    check_pp(ext_cx, *stmt, pprust::print_stmt, ~"let x = 20;");
+    check_pp(ext_cx, *stmt, pprust::print_stmt, "let x = 20;".to_owned());
 
     let pat = quote_pat!(cx, Some(_));
-    check_pp(ext_cx, pat, pprust::print_pat, ~"Some(_)");
+    check_pp(ext_cx, pat, pprust::print_pat, "Some(_)".to_owned());
 
 }
 
@@ -82,7 +82,7 @@ fn check_pp<T>(cx: fake_ext_ctxt,
         pp::eof(pp.s);
     });
     stdout().write_line(s);
-    if expect != ~"" {
+    if expect != "".to_owned() {
         println!("expect: '%s', got: '%s'", expect, s);
         assert_eq!(s, expect);
     }