]> git.lizzy.rs Git - rust.git/blob - src/test/ui/exclusive-drop-and-copy.rs
Merge commit '9e3cd88718cd1912a515d26dbd9c4019fd5a9577' into clippyup
[rust.git] / src / test / ui / exclusive-drop-and-copy.rs
1 // issue #20126
2
3 #[derive(Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented
4 struct Foo;
5
6 impl Drop for Foo {
7     fn drop(&mut self) {}
8 }
9
10 #[derive(Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented
11 struct Bar<T>(::std::marker::PhantomData<T>);
12
13 impl<T> Drop for Bar<T> {
14     fn drop(&mut self) {}
15 }
16
17 fn main() {}