]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / compile-fail / disallowed-deconstructing-destructing-struct-let.rs
index 4652aa0d3f12518c43d938dcdeceb5bfeda929ff..40bb63907c9f16f20a1acbe7bce5a069e45a9389 100644 (file)
@@ -13,8 +13,8 @@ struct X {
 }
 
 impl Drop for X {
-    fn drop(&self) {
-        error!("value: %s", self.x);
+    fn drop(&mut self) {
+        println!("value: {}", self.x);
     }
 }
 
@@ -24,7 +24,7 @@ fn unwrap(x: X) -> ~str {
 }
 
 fn main() {
-    let x = X { x: ~"hello" };
+    let x = X { x: "hello".to_owned() };
     let y = unwrap(x);
-    error!("contents: %s", y);
+    println!("contents: {}", y);
 }