mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 01:55:03 +00:00
25 lines
428 B
Rust
25 lines
428 B
Rust
#![allow(clippy::incorrect_clone_impl_on_copy_type)]
|
|
|
|
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() {}
|