Auto merge of #60303 - CryZe:patch-6, r=Centril

Stabilize pointer::align_offset

Closes #44488
This commit is contained in:
bors 2019-04-26 12:49:11 +00:00
commit 597f432489
3 changed files with 2 additions and 6 deletions

View File

@ -1540,7 +1540,6 @@ impl<T: ?Sized> *const T {
/// Accessing adjacent `u8` as `u16` /// Accessing adjacent `u8` as `u16`
/// ///
/// ``` /// ```
/// # #![feature(align_offset)]
/// # fn foo(n: usize) { /// # fn foo(n: usize) {
/// # use std::mem::align_of; /// # use std::mem::align_of;
/// # unsafe { /// # unsafe {
@ -1556,7 +1555,7 @@ impl<T: ?Sized> *const T {
/// } /// }
/// # } } /// # } }
/// ``` /// ```
#[unstable(feature = "align_offset", issue = "44488")] #[stable(feature = "align_offset", since = "1.36.0")]
pub fn align_offset(self, align: usize) -> usize where T: Sized { pub fn align_offset(self, align: usize) -> usize where T: Sized {
if !align.is_power_of_two() { if !align.is_power_of_two() {
panic!("align_offset: align is not a power-of-two"); panic!("align_offset: align is not a power-of-two");
@ -2312,7 +2311,6 @@ impl<T: ?Sized> *mut T {
/// Accessing adjacent `u8` as `u16` /// Accessing adjacent `u8` as `u16`
/// ///
/// ``` /// ```
/// # #![feature(align_offset)]
/// # fn foo(n: usize) { /// # fn foo(n: usize) {
/// # use std::mem::align_of; /// # use std::mem::align_of;
/// # unsafe { /// # unsafe {
@ -2328,7 +2326,7 @@ impl<T: ?Sized> *mut T {
/// } /// }
/// # } } /// # } }
/// ``` /// ```
#[unstable(feature = "align_offset", issue = "44488")] #[stable(feature = "align_offset", since = "1.36.0")]
pub fn align_offset(self, align: usize) -> usize where T: Sized { pub fn align_offset(self, align: usize) -> usize where T: Sized {
if !align.is_power_of_two() { if !align.is_power_of_two() {
panic!("align_offset: align is not a power-of-two"); panic!("align_offset: align is not a power-of-two");

View File

@ -26,7 +26,6 @@
#![feature(test)] #![feature(test)]
#![feature(trusted_len)] #![feature(trusted_len)]
#![feature(try_trait)] #![feature(try_trait)]
#![feature(align_offset)]
#![feature(reverse_bits)] #![feature(reverse_bits)]
#![feature(inner_deref)] #![feature(inner_deref)]
#![feature(slice_internals)] #![feature(slice_internals)]

View File

@ -227,7 +227,6 @@
// std is implemented with unstable features, many of which are internal // std is implemented with unstable features, many of which are internal
// compiler details that will never be stable // compiler details that will never be stable
// NB: the following list is sorted to minimize merge conflicts. // NB: the following list is sorted to minimize merge conflicts.
#![feature(align_offset)]
#![feature(alloc_error_handler)] #![feature(alloc_error_handler)]
#![feature(alloc_layout_extra)] #![feature(alloc_layout_extra)]
#![feature(allocator_api)] #![feature(allocator_api)]