]> git.lizzy.rs Git - rust.git/commitdiff
all tests pass
authorNiko Matsakis <niko@alum.mit.edu>
Mon, 10 Oct 2011 22:19:34 +0000 (15:19 -0700)
committerBrian Anderson <banderson@mozilla.com>
Wed, 12 Oct 2011 23:33:06 +0000 (16:33 -0700)
src/compiletest/procsrv.rs
src/test/run-pass/interior-vec.rs
src/test/run-pass/issue-506.rs
src/test/run-pass/unify-return-ty.rs
src/test/run-pass/unique-copy-box.rs

index 6a74d044bfb1dbc022ef11a78b6c48c268fae5d1..467b98d8b640a85441de0034e27f0702cfec94f7 100644 (file)
@@ -79,7 +79,7 @@ fn writeclose(fd: int, s: option::t<str>) unsafe {
     os::libc::close(fd);
 }
 
-fn readclose(fd: int) -> str {
+fn readclose(fd: int) -> str unsafe {
     // Copied from run::program_output
     let file = os::fd_FILE(fd);
     let reader = io::new_reader(io::FILE_buf_reader(file, option::none));
@@ -92,7 +92,7 @@ fn readclose(fd: int) -> str {
     ret buf;
 }
 
-fn worker(p: port<request>) {
+fn worker(p: port<request>) unsafe {
 
     // FIXME (787): If we declare this inside of the while loop and then
     // break out of it before it's ever initialized (i.e. we don't run
index 0c0a3c17179b40306e82d63c102c8c65f88f5443..b28367790464ceb4d007f7f14874cae9726ea2ed 100644 (file)
@@ -4,7 +4,7 @@
     fn vec_len<T>(&&v: [T]) -> uint;
 }
 
-fn main() {
+fn main() unsafe {
     let v: [int] = [];
     assert (vec_len(v) == 0u); // zero-length
     let x = [1, 2];
index 8285b5e1f3b4a6e1b4cae238cb40cf329ea4505b..2ed94852bf97b7fd3d0c37d0f8b3de0ab8c6c047 100644 (file)
@@ -9,6 +9,6 @@
     fn task_yield();
 }
 
-fn yield_wrap() { rustrt::task_yield(); }
+fn yield_wrap() unsafe { rustrt::task_yield(); }
 
 fn main() { let f = yield_wrap; task::spawn(f); }
index b8f9a39f50bd9b163fe433f6dfbba23da8a191a9..2a22499e8c72c266200c620e43435a0116822f7f 100644 (file)
@@ -4,6 +4,6 @@
 use std;
 import std::unsafe;
 
-fn null<@T>() -> *T { unsafe::reinterpret_cast(0) }
+fn null<@T>() -> *T unsafe { unsafe::reinterpret_cast(0) }
 
 fn main() { null::<int>(); }
index d7a5e3fe8500b245f682c2b0dfe5199251d46b3a..6a54407b458373f17f93b23d350e0ef86a91cb12 100644 (file)
@@ -1,7 +1,7 @@
 use std;
 import std::sys::rustrt::refcount;
 
-fn main() {
+fn main() unsafe {
     let i = ~@1;
     let j = ~@2;
     let rc1 = refcount(*i);