diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-09-27 22:20:47 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-09-28 13:27:45 -0700 |
| commit | 21519bc7e0a32e388e8b12be5d36d4440129f417 (patch) | |
| tree | bcdd50c7816a21a5d5422c114e722df1a5dcc65d /src/libcore/ptr.rs | |
| parent | 6c15dd6d8217a166cfd0d364a434771803123432 (diff) | |
| download | rust-21519bc7e0a32e388e8b12be5d36d4440129f417.tar.gz rust-21519bc7e0a32e388e8b12be5d36d4440129f417.zip | |
demode vec
Diffstat (limited to 'src/libcore/ptr.rs')
| -rw-r--r-- | src/libcore/ptr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 72fa2cda1a7..7f1f1e4b345 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -127,7 +127,7 @@ pub unsafe fn memset<T>(dst: *mut T, c: int, count: uint) { reinterpret_cast. */ #[inline(always)] -pub fn to_unsafe_ptr<T>(thing: &T) -> *T { +pub pure fn to_unsafe_ptr<T>(thing: &T) -> *T { unsafe { cast::reinterpret_cast(&thing) } } @@ -137,7 +137,7 @@ pub fn to_unsafe_ptr<T>(thing: &T) -> *T { reinterpret_cast. */ #[inline(always)] -pub fn to_const_unsafe_ptr<T>(thing: &const T) -> *const T { +pub pure fn to_const_unsafe_ptr<T>(thing: &const T) -> *const T { unsafe { cast::reinterpret_cast(&thing) } } @@ -147,7 +147,7 @@ pub fn to_const_unsafe_ptr<T>(thing: &const T) -> *const T { reinterpret_cast. */ #[inline(always)] -pub fn to_mut_unsafe_ptr<T>(thing: &mut T) -> *mut T { +pub pure fn to_mut_unsafe_ptr<T>(thing: &mut T) -> *mut T { unsafe { cast::reinterpret_cast(&thing) } } |
