]> git.lizzy.rs Git - rust.git/blob - src/test/ui/exclusive-drop-and-copy.rs
Rollup merge of #103694 - WaffleLapkin:mask_doc_example, r=scottmcm
[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() {}