Determine if two shared boxes point to the same object
Arguments:
#[test] | |
fn try_success() { | |
alt task::try {|| | |
"Success!" | |
} { | |
result::ok("Success!") { } | |
_ { fail; } | |
} | |
} |
gcc oldrust newrust oldrust% newrust% | |
ackermann 6.118s 9.350s 8.737s 153% 142% | |
binarytrees 3.112s 15.505s 22.585s 498% 726% | |
fannkuchredux 5.201s 9.523s 8.345s 183% 160% | |
fibo 3.314s 15.235s 11.129s 460% 336% | |
nbody 3.300s 4.734s 11.005s 144% 334% |
tag modlist = [int]; | |
fn main() { | |
let ml = modlist([]); | |
assert ml == modlist([]); | |
assert ml == modlist([]); |
fn reserve_empty(nn: uint) -> str unsafe { | |
// start with a null-terminated 0-length string | |
let ss = ""; | |
// make a vector | |
let vv: [u8] = unsafe::reinterpret_cast(ss); | |
unsafe::leak(ss); | |
// expand it to size + \0 | |
vec::reserve(vv, nn+1u); |
Version 0.1 (January 2012) | |
--------------------------- | |
* Most language features work, including: | |
* Pattern matching and destructuring assignment | |
* Multithread task scheduling |