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

10 lines
149 B
Rust
Raw Normal View History

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