2015-01-07 10:07:56 +11:00
|
|
|
// issue #20126
|
|
|
|
|
2023-03-07 23:55:51 +00:00
|
|
|
#[derive(Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented
|
2015-01-07 10:07:56 +11:00
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Drop for Foo {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
2023-03-07 23:55:51 +00:00
|
|
|
#[derive(Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented
|
2015-02-12 10:29:52 -05:00
|
|
|
struct Bar<T>(::std::marker::PhantomData<T>);
|
2015-01-07 10:07:56 +11:00
|
|
|
|
|
|
|
impl<T> Drop for Bar<T> {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|