summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2018-04-05 11:40:06 +0900
committerMike Hommey <mh@glandium.org>2018-04-05 11:40:22 +0900
commite2bfbc5eb095ec515439251974f79b34d43b2dba (patch)
tree2aceea45d147375c193e3490ce7d6ce8f5109a33
parent829d02037c4e942e832932c8eb09f80bbcdab70f (diff)
downloadrust-libc-e2bfbc5eb095ec515439251974f79b34d43b2dba.tar.gz
Add dox::{Copy, Clone} impls for pointer and integer types.
Fixes: #961
-rw-r--r--src/dox.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dox.rs b/src/dox.rs
index 1aea62d021..1c93efe708 100644
--- a/src/dox.rs
+++ b/src/dox.rs
@@ -19,6 +19,16 @@ mod imp {
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 @@ mod imp {
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);