]> git.proxmox.com Git - rustc.git/blob - src/test/ui/exclusive-drop-and-copy.rs
New upstream version 1.66.0+dfsg1
[rustc.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() {}