]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/expr-if-box.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / run-pass / expr-if-box.rs
index e560da224ff80173238fe3543a5997cc2e15a75e..78e2d3caea9b990471fa9fa1cb5261577b951206 100644 (file)
@@ -8,10 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
-// -*- rust -*-
+#![feature(managed_boxes)]
 
 // Tests for if as expressions returning boxed types
 fn test_box() {
@@ -20,8 +17,8 @@ fn test_box() {
 }
 
 fn test_str() {
-    let rs = if true { ~"happy" } else { ~"sad" };
-    assert_eq!(rs, ~"happy");
+    let rs = if true { "happy".to_owned() } else { "sad".to_owned() };
+    assert_eq!(rs, "happy".to_owned());
 }
 
 pub fn main() { test_box(); test_str(); }