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

10 lines
156 B
Rust
Raw Normal View History

extern mod std;
2012-09-05 14:32:05 -05:00
use std::arena;
fn main() {
2012-08-11 09:08:42 -05:00
let p = &arena::Arena();
let x = p.alloc(|| 4u);
2012-08-22 19:24:52 -05:00
io::print(fmt!("%u", *x));
assert *x == 4u;
}