6 struct OnlyCopyIfDisplay<T>(std::marker::PhantomData<T>);
8 impl<T: std::fmt::Display> Clone for OnlyCopyIfDisplay<T> {
9 fn clone(&self) -> Self {
10 OnlyCopyIfDisplay(std::marker::PhantomData)
14 impl<T: std::fmt::Display> Copy for OnlyCopyIfDisplay<T> {}
16 impl<S> Copy for Wrapper<OnlyCopyIfDisplay<S>> {}
17 //~^ ERROR the trait `Copy` may not be implemented for this type