Auto merge of #962 - glandium:dox, r=alexcrichton

Add dox::{Copy, Clone} impls for pointer and integer types.

Fixes: #961
This commit is contained in:
bors 2018-04-05 17:17:15 +00:00
commit 512380148e

View file

@ -19,6 +19,16 @@ mod imp {
fn clone(&self) -> Option<T> { loop {} } fn clone(&self) -> Option<T> { loop {} }
} }
impl<T> Copy for *mut T {}
impl<T> Clone for *mut T {
fn clone(&self) -> *mut T { loop {} }
}
impl<T> Copy for *const T {}
impl<T> Clone for *const T {
fn clone(&self) -> *const T { loop {} }
}
pub trait Clone { pub trait Clone {
fn clone(&self) -> Self; fn clone(&self) -> Self;
} }
@ -140,6 +150,10 @@ mod imp {
type Output = $i; type Output = $i;
fn add(self, other: $i) -> $i { self + other } fn add(self, other: $i) -> $i { self + other }
} }
impl Copy for $i {}
impl Clone for $i {
fn clone(&self) -> $i { loop {} }
}
)*) )*)
} }
each_int!(impl_traits); each_int!(impl_traits);