Skip to content

Commit

Permalink
Auto merge of #60303 - CryZe:patch-6, r=Centril
Browse files Browse the repository at this point in the history
Stabilize pointer::align_offset

Closes #44488
  • Loading branch information
bors committed Apr 26, 2019
2 parents 3ee9363 + cf9d667 commit 597f432
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,6 @@ impl<T: ?Sized> *const T {
/// Accessing adjacent `u8` as `u16`
///
/// ```
/// # #![feature(align_offset)]
/// # fn foo(n: usize) {
/// # use std::mem::align_of;
/// # unsafe {
Expand All @@ -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 {
if !align.is_power_of_two() {
panic!("align_offset: align is not a power-of-two");
Expand Down Expand Up @@ -2312,7 +2311,6 @@ impl<T: ?Sized> *mut T {
/// Accessing adjacent `u8` as `u16`
///
/// ```
/// # #![feature(align_offset)]
/// # fn foo(n: usize) {
/// # use std::mem::align_of;
/// # unsafe {
Expand All @@ -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 {
if !align.is_power_of_two() {
panic!("align_offset: align is not a power-of-two");
Expand Down
1 change: 0 additions & 1 deletion src/libcore/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#![feature(test)]
#![feature(trusted_len)]
#![feature(try_trait)]
#![feature(align_offset)]
#![feature(reverse_bits)]
#![feature(inner_deref)]
#![feature(slice_internals)]
Expand Down
1 change: 0 additions & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@
// std is implemented with unstable features, many of which are internal
// compiler details that will never be stable
// NB: the following list is sorted to minimize merge conflicts.
#![feature(align_offset)]
#![feature(alloc_error_handler)]
#![feature(alloc_layout_extra)]
#![feature(allocator_api)]
Expand Down

0 comments on commit 597f432

Please sign in to comment.