]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/moves-based-on-type-capture-clause.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / run-pass / moves-based-on-type-capture-clause.rs
index 26d4773d961aa6855dd2dfbb7721de690582ea08..5eb806fe859950ad36c1051e3528bdc6a3065217 100644 (file)
@@ -1,6 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::task;
+
 pub fn main() {
-    let x = ~"Hello world!";
-    do task::spawn {
-        io::println(x);
-    }
+    let x = "Hello world!".to_owned();
+    task::spawn(proc() {
+        println!("{}", x);
+    });
 }