From 1462cab562842e3dcfd062b9515a24b6f7c2bb1a Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 14 Sep 2017 09:18:27 +0200 Subject: [PATCH] No need to duplicate the inherent method for stage0 --- src/libcore/ptr.rs | 20 -------------------- src/libstd/lib.rs | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 02d742f0e3dca..11b2e0f81dd78 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -662,22 +662,12 @@ impl *const T { /// } /// # } } /// ``` - #[cfg(not(stage0))] #[unstable(feature = "align_offset", issue = "44488")] pub fn align_offset(self, align: usize) -> usize { unsafe { intrinsics::align_offset(self as *const _, align) } } - - #[cfg(stage0)] - #[stable(feature = "rust1", since = "1.0.0")] - /// remove me after the next release - pub fn align_offset(self, align: usize) -> usize { - unsafe { - intrinsics::align_offset(self as *const _, align) - } - } } #[lang = "mut_ptr"] @@ -901,22 +891,12 @@ impl *mut T { /// } /// # } } /// ``` - #[cfg(not(stage0))] #[unstable(feature = "align_offset", issue = "44488")] pub fn align_offset(self, align: usize) -> usize { unsafe { intrinsics::align_offset(self as *const _, align) } } - - #[cfg(stage0)] - #[stable(feature = "rust1", since = "1.0.0")] - /// remove me after the next release - pub fn align_offset(self, align: usize) -> usize { - unsafe { - intrinsics::align_offset(self as *const _, align) - } - } } // Equality for pointers diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 662285edd78ff..71c665a52f453 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -242,7 +242,7 @@ #![feature(allocator_internals)] #![feature(allow_internal_unsafe)] #![feature(allow_internal_unstable)] -#![cfg_attr(not(stage0), feature(align_offset))] +#![feature(align_offset)] #![feature(asm)] #![feature(box_syntax)] #![feature(cfg_target_has_atomic)]