4 #![deny(drop_copy, forget_copy)]
5 #![allow(toplevel_ref_arg, drop_ref, forget_ref, unused_mut)]
7 use std::mem::{drop, forget};
10 #[derive(Copy, Clone)]
14 struct AnotherStruct {
20 impl Clone for AnotherStruct {
21 fn clone(& self) -> AnotherStruct {
22 AnotherStruct{x: self.x, y: self.y, z: self.z.clone()}
27 let s1 = SomeStruct {};
45 let a1 = AnotherStruct {x: 255, y: 0, z: vec![1, 2, 3]};
47 let mut a3 = a1.clone();