1 #![feature(generic_associated_types)]
2 #![feature(associated_type_defaults)]
7 type Copy<T>: Copy = Box<T>;
8 //~^ ERROR the trait bound `Box<T>: Copy` is not satisfied
9 //~^^ ERROR the trait bound `T: Clone` is not satisfied
10 fn copy<T>(x: &Self::Copy<T>) -> Self::Copy<T> {
15 impl<T> UnsafeCopy for T {}
18 let b = Box::new(42usize);
19 let copy = <()>::copy(&b);
21 let raw_b = Box::deref(&b) as *const _;
22 let raw_copy = Box::deref(©) as *const _;
24 // assert the addresses.
25 assert_eq!(raw_b, raw_copy);