1
Fork 0

Bootstrap from 1.28.0-beta.3

This commit is contained in:
Mark Simulacrum 2018-06-22 09:48:43 -06:00 committed by Alex Crichton
parent 5d95db34a4
commit ad97f8b491
23 changed files with 54 additions and 343 deletions

View file

@ -1243,7 +1243,6 @@ impl<T: ?Sized> *const T {
/// # } }
/// ```
#[unstable(feature = "align_offset", issue = "44488")]
#[cfg(not(stage0))]
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");
@ -1252,18 +1251,6 @@ impl<T: ?Sized> *const T {
align_offset(self, align)
}
}
/// definitely docs.
#[unstable(feature = "align_offset", issue = "44488")]
#[cfg(stage0)]
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");
}
unsafe {
intrinsics::align_offset(self as *const (), align)
}
}
}
@ -2308,7 +2295,6 @@ impl<T: ?Sized> *mut T {
/// # } }
/// ```
#[unstable(feature = "align_offset", issue = "44488")]
#[cfg(not(stage0))]
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");
@ -2317,18 +2303,6 @@ impl<T: ?Sized> *mut T {
align_offset(self, align)
}
}
/// definitely docs.
#[unstable(feature = "align_offset", issue = "44488")]
#[cfg(stage0)]
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");
}
unsafe {
intrinsics::align_offset(self as *const (), align)
}
}
}
/// Align pointer `p`.
@ -2346,7 +2320,6 @@ impl<T: ?Sized> *mut T {
///
/// Any questions go to @nagisa.
#[lang="align_offset"]
#[cfg(not(stage0))]
pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
/// Calculate multiplicative modular inverse of `x` modulo `m`.
///