2
0
Fork 0
mirror of https://github.com/rust-lang/rust-clippy synced 2024-12-14 07:12:51 +00:00
rust-clippy/tests/ui/clone_on_copy_impl.rs
2019-01-08 21:46:39 +01:00

22 lines
374 B
Rust

use std::fmt;
use std::marker::PhantomData;
pub struct Key<T> {
#[doc(hidden)]
pub __name: &'static str,
#[doc(hidden)]
pub __phantom: PhantomData<T>,
}
impl<T> Copy for Key<T> {}
impl<T> Clone for Key<T> {
fn clone(&self) -> Self {
Key {
__name: self.__name,
__phantom: self.__phantom,
}
}
}
fn main() {}