rust/src/test/run-pass/placement-new-arena.rs
2012-08-02 22:36:36 -07:00

10 lines
152 B
Rust

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