1 #![feature(extern_types)]
4 type OpaqueListContents;
10 opaque: OpaqueListContents,
13 pub struct Interned<'a, T>(&'a T);
15 impl<'a, T> Clone for Interned<'a, T> {
16 fn clone(&self) -> Self {
21 impl<'a, T> Copy for Interned<'a, T> {}
23 pub struct List<'tcx, T>(Interned<'tcx, ListS<T>>);
24 //~^ NOTE this field does not implement `Copy`
25 //~| NOTE the `Copy` impl for `Interned<'tcx, ListS<T>>` requires that `OpaqueListContents: Sized`
27 impl<'tcx, T> Clone for List<'tcx, T> {
28 fn clone(&self) -> Self {
33 impl<'tcx, T> Copy for List<'tcx, T> {}
34 //~^ ERROR the trait `Copy` may not be implemented for this type
36 fn assert_is_copy<T: Copy>() {}
39 assert_is_copy::<List<'static, ()>>();