// option. This file may not be copied, modified, or distributed
// except according to those terms.
-struct Fat<Sized? T> {
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
+struct Fat<T: ?Sized> {
f1: int,
f2: &'static str,
ptr: T
}
-#[deriving(PartialEq,Eq)]
+#[derive(Copy, PartialEq, Eq)]
struct Bar;
trait ToBar {
assert!((*f2)[1] == 2);
// Nested Box.
- let f1 : Box<Fat<[int, ..3]>> = box Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] };
+ let f1 : Box<Fat<[int; 3]>> = box Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] };
foo(&*f1);
let f2 : Box<Fat<[int]>> = f1;
foo(&*f2);