#![allow(non_camel_case_types)]
#![allow(dead_code)]
-#![feature(box_syntax)]
use std::cell::Cell;
fn test_unique() {
let i = &Cell::new(0);
{
- let _a: Box<_> = box r(i);
+ let _a: Box<_> = Box::new(r(i));
}
assert_eq!(i.get(), 1);
}
fn test_unique_rec() {
let i = &Cell::new(0);
{
- let _a: Box<_> = box BoxR {
+ let _a: Box<_> = Box::new(BoxR {
x: r(i)
- };
+ });
}
assert_eq!(i.get(), 1);
}