// issue #20126 #[derive(Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented struct Foo; impl Drop for Foo { fn drop(&mut self) {} } #[derive(Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented struct Bar(::std::marker::PhantomData); impl Drop for Bar { fn drop(&mut self) {} } fn main() {}