Add dox::{Copy, Clone} impls for pointer and integer types.
Fixes: #961
diff --git a/src/dox.rs b/src/dox.rs
index 1aea62d..1c93efe 100644
--- a/src/dox.rs
+++ b/src/dox.rs
@@ -19,6 +19,16 @@
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 {
fn clone(&self) -> Self;
}
@@ -140,6 +150,10 @@
type Output = $i;
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);