]> git.lizzy.rs Git - rust.git/blob - tests/ui/clone_on_copy_impl.rs
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / clone_on_copy_impl.rs
1 use std::fmt;
2 use std::marker::PhantomData;
3
4 pub struct Key<T> {
5     #[doc(hidden)]
6     pub __name: &'static str,
7     #[doc(hidden)]
8     pub __phantom: PhantomData<T>,
9 }
10
11 impl<T> Copy for Key<T> {}
12
13 impl<T> Clone for Key<T> {
14     fn clone(&self) -> Self {
15         Key {
16             __name: self.__name,
17             __phantom: self.__phantom,
18         }
19     }
20 }
21
22 fn main() {}