all tests pass
This commit is contained in:
parent
85da98db4a
commit
db16fce77f
@ -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
|
||||
|
@ -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];
|
||||
|
@ -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); }
|
||||
|
@ -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>(); }
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user