Skip to content

Commit

Permalink
No need to duplicate the inherent method for stage0
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 14, 2017
1 parent 2184663 commit 1462cab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,22 +662,12 @@ impl<T: ?Sized> *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"]
Expand Down Expand Up @@ -901,22 +891,12 @@ impl<T: ?Sized> *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
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 1462cab

Please sign in to comment.