diff options
| author | Aaron Turon <aturon@mozilla.com> | 2017-03-14 20:51:29 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-03-17 13:28:37 -0700 |
| commit | d38ea8b371f781aa4b0689c46ede75b5385fedba (patch) | |
| tree | bec54915da5a26f8f388885a83cf07f2e084965e /src/libcore | |
| parent | 65b7c4ed31ae8601c39deab8ca18235b0bea520b (diff) | |
| download | rust-d38ea8b371f781aa4b0689c46ede75b5385fedba.tar.gz rust-d38ea8b371f781aa4b0689c46ede75b5385fedba.zip | |
Stabilize ptr_unaligned feature, closes #37955
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ptr.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 0b7aa4fa911..e4ad8cfd256 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -161,8 +161,6 @@ pub unsafe fn read<T>(src: *const T) -> T { /// Basic usage: /// /// ``` -/// #![feature(ptr_unaligned)] -/// /// let x = 12; /// let y = &x as *const i32; /// @@ -171,7 +169,7 @@ pub unsafe fn read<T>(src: *const T) -> T { /// } /// ``` #[inline(always)] -#[unstable(feature = "ptr_unaligned", issue = "37955")] +#[stable(feature = "ptr_unaligned", since = "1.17.0")] pub unsafe fn read_unaligned<T>(src: *const T) -> T { let mut tmp: T = mem::uninitialized(); copy_nonoverlapping(src as *const u8, @@ -243,8 +241,6 @@ pub unsafe fn write<T>(dst: *mut T, src: T) { /// Basic usage: /// /// ``` -/// #![feature(ptr_unaligned)] -/// /// let mut x = 0; /// let y = &mut x as *mut i32; /// let z = 12; @@ -255,7 +251,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) { /// } /// ``` #[inline] -#[unstable(feature = "ptr_unaligned", issue = "37955")] +#[stable(feature = "ptr_unaligned", since = "1.17.0")] pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) { copy_nonoverlapping(&src as *const T as *const u8, dst as *mut u8, |
