// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(managed_boxes)]
use std::cell::Cell;
+use std::gc::GC;
enum newtype {
- newtype(int)
+ newvar(int)
}
pub fn main() {
// Test that borrowck treats enums with a single variant
// specially.
- let x = @Cell::new(5);
- let y = @Cell::new(newtype(3));
+ let x = box(GC) Cell::new(5);
+ let y = box(GC) Cell::new(newvar(3));
let z = match y.get() {
- newtype(b) => {
+ newvar(b) => {
x.set(x.get() + 1);
x.get() * b
}