diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2015-07-24 21:02:05 +0200 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2015-08-09 22:05:22 +0200 |
| commit | 47041fe28920326807b29c1246ca9712e184f885 (patch) | |
| tree | 8a7de25f7da03695a5003eb49adf52f64b9f3de0 /src/libcore | |
| parent | 22ec5f4af7b5a85ad375d672ed727571b49f3cad (diff) | |
Make `slice::transmute*` private
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/slice.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 9120da78d25..aa34b651157 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -1455,8 +1455,7 @@ fn check_types<T,U>() { /// This functions panics if the above preconditions about the types are not /// met. #[inline] -#[unstable(feature = "slice_transmute", reason = "recent API addition")] -pub unsafe fn transmute<T,U>(slice: &[T]) -> &[U] { +unsafe fn transmute<T,U>(slice: &[T]) -> &[U] { check_types::<T,U>(); from_raw_parts(slice.as_ptr() as *const U, slice.len()) } @@ -1466,8 +1465,7 @@ pub unsafe fn transmute<T,U>(slice: &[T]) -> &[U] { /// /// Equivalent of `slice::transmute` for mutable slices. #[inline] -#[unstable(feature = "slice_transmute", reason = "recent API addition")] -pub unsafe fn transmute_mut<T,U>(slice: &mut [T]) -> &mut [U] { +unsafe fn transmute_mut<T,U>(slice: &mut [T]) -> &mut [U] { check_types::<T,U>(); from_raw_parts_mut(slice.as_mut_ptr() as *mut U, slice.len()) } |
