mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
auto merge of #10066 : sanxiyn/rust/mut-ptr-clone, r=thestinger
This commit is contained in:
@@ -47,6 +47,13 @@ fn clone(&self) -> *T {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Clone for *mut T {
|
||||
#[inline]
|
||||
fn clone(&self) -> *mut T {
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
/// Return the first offset `i` such that `f(buf[i]) == true`.
|
||||
#[inline]
|
||||
pub unsafe fn position<T>(buf: *T, f: &fn(&T) -> bool) -> uint {
|
||||
|
||||
Reference in New Issue
Block a user