]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/issue-13428.rs
test: Remove all uses of `~str` from the test suite.
[rust.git] / src / test / compile-fail / issue-13428.rs
index 7e24d909237bb0a8566322e676823c517ab7e7cf..ab763a2b583caf63ee85fa3969cb611bdd4eb07e 100644 (file)
 
 // Regression test for #13428
 
-fn foo() -> ~str {  //~ ERROR not all control paths return a value
-    format!("Hello {}",
-            "world")
+fn foo() -> StrBuf {  //~ ERROR not all control paths return a value
+    format_strbuf!("Hello {}",
+                   "world")
     // Put the trailing semicolon on its own line to test that the
     // note message gets the offending semicolon exactly
     ;   //~ NOTE consider removing this semicolon
 }
 
-fn bar() -> ~str {  //~ ERROR not all control paths return a value
-    "foobar".to_owned()
+fn bar() -> StrBuf {  //~ ERROR not all control paths return a value
+    "foobar".to_strbuf()
     ;   //~ NOTE consider removing this semicolon
 }