Skip to content

Commit 90a0464

Browse files
committed
Auto merge of #962 - glandium:dox, r=alexcrichton
Add dox::{Copy, Clone} impls for pointer and integer types. Fixes: #961
2 parents 829d020 + e2bfbc5 commit 90a0464

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/dox.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ mod imp {
1919
fn clone(&self) -> Option<T> { loop {} }
2020
}
2121

22+
impl<T> Copy for *mut T {}
23+
impl<T> Clone for *mut T {
24+
fn clone(&self) -> *mut T { loop {} }
25+
}
26+
27+
impl<T> Copy for *const T {}
28+
impl<T> Clone for *const T {
29+
fn clone(&self) -> *const T { loop {} }
30+
}
31+
2232
pub trait Clone {
2333
fn clone(&self) -> Self;
2434
}
@@ -140,6 +150,10 @@ mod imp {
140150
type Output = $i;
141151
fn add(self, other: $i) -> $i { self + other }
142152
}
153+
impl Copy for $i {}
154+
impl Clone for $i {
155+
fn clone(&self) -> $i { loop {} }
156+
}
143157
)*)
144158
}
145159
each_int!(impl_traits);

0 commit comments

Comments
 (0)