]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/dst-struct.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / dst-struct.rs
index 6b8e25e85590f6aaa2d57bbcf84e306885f9465e..fa2af29431c308262352bdd6bec362dd4077cb04 100644 (file)
@@ -8,7 +8,10 @@
 // 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
@@ -46,7 +49,7 @@ fn foo3(x: &Fat<Fat<[int]>>) {
 }
 
 
-#[deriving(PartialEq,Eq)]
+#[derive(Copy, PartialEq, Eq)]
 struct Bar;
 
 trait ToBar {
@@ -118,7 +121,7 @@ pub fn main() {
     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<[int3]>> = box Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] };
     foo(&*f1);
     let f2 : Box<Fat<[int]>> = f1;
     foo(&*f2);