rust/src/test/run-pass/placement-new-arena.rs

10 lines
156 B
Rust

extern mod std;
use std::arena;
fn main() {
let p = &arena::Arena();
let x = p.alloc(|| 4u);
io::print(fmt!("%u", *x));
assert *x == 4u;
}