]> git.lizzy.rs Git - rust.git/blob - src/test/ui/exclusive-drop-and-copy.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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() {}