From 3b1f1a644609448468e6b4adb77c91bba09597e3 Mon Sep 17 00:00:00 2001
From: Christopher Serr <christopher.serr@gmail.com>
Date: Fri, 26 Apr 2019 12:15:12 +0200
Subject: [PATCH 1/2] Stabilize pointer::align_offset

Closes #44488
---
 src/libcore/ptr.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 5d77b4dfbf7..a41be4269d5 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -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 {
@@ -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");
@@ -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 {
@@ -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");

From cf9d6672b76c08e556416e4da43cebfc2bcb1a97 Mon Sep 17 00:00:00 2001
From: Christopher Serr <christopher.serr@gmail.com>
Date: Fri, 26 Apr 2019 12:33:42 +0200
Subject: [PATCH 2/2] Remove feature gates from std and tests

---
 src/libcore/tests/lib.rs | 1 -
 src/libstd/lib.rs        | 1 -
 2 files changed, 2 deletions(-)

diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs
index a3d294e77d3..ae12eb116b5 100644
--- a/src/libcore/tests/lib.rs
+++ b/src/libcore/tests/lib.rs
@@ -26,7 +26,6 @@
 #![feature(test)]
 #![feature(trusted_len)]
 #![feature(try_trait)]
-#![feature(align_offset)]
 #![feature(reverse_bits)]
 #![feature(inner_deref)]
 #![feature(slice_internals)]
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 7b0e090fb1b..215f1bbc971 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -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)]