Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #63648

Merged
merged 18 commits into from
Aug 17, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
@@ -102,8 +102,13 @@ fn main() {
// FIXME: the fact that core here is excluded is due to core_arch from our stdarch submodule
// being broken on the beta compiler with bootstrap passed, so this is a temporary workaround
// (we've just snapped, so there are no cfg(bootstrap) related annotations in core).
if stage == "0" && crate_name != Some("core") {
cmd.arg("--cfg").arg("bootstrap");
if stage == "0" {
if crate_name != Some("core") {
cmd.arg("--cfg").arg("bootstrap");
} else {
// NOTE(eddyb) see FIXME above, except now we need annotations again in core.
cmd.arg("--cfg").arg("boostrap_stdarch_ignore_this");
}
}

// Print backtrace in case of ICE
12 changes: 6 additions & 6 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
@@ -1293,38 +1293,38 @@ extern "rust-intrinsic" {
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_add` method. For example,
/// [`std::u32::wrapping_add`](../../std/primitive.u32.html#method.wrapping_add)
#[cfg(bootstrap)]
#[cfg(boostrap_stdarch_ignore_this)]
pub fn overflowing_add<T>(a: T, b: T) -> T;
/// Returns (a - b) mod 2<sup>N</sup>, where N is the width of T in bits.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_sub` method. For example,
/// [`std::u32::wrapping_sub`](../../std/primitive.u32.html#method.wrapping_sub)
#[cfg(bootstrap)]
#[cfg(boostrap_stdarch_ignore_this)]
pub fn overflowing_sub<T>(a: T, b: T) -> T;
/// Returns (a * b) mod 2<sup>N</sup>, where N is the width of T in bits.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_mul` method. For example,
/// [`std::u32::wrapping_mul`](../../std/primitive.u32.html#method.wrapping_mul)
#[cfg(bootstrap)]
#[cfg(boostrap_stdarch_ignore_this)]
pub fn overflowing_mul<T>(a: T, b: T) -> T;

/// Returns (a + b) mod 2<sup>N</sup>, where N is the width of T in bits.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_add` method. For example,
/// [`std::u32::wrapping_add`](../../std/primitive.u32.html#method.wrapping_add)
#[cfg(not(bootstrap))]
#[cfg(not(boostrap_stdarch_ignore_this))]
pub fn wrapping_add<T>(a: T, b: T) -> T;
/// Returns (a - b) mod 2<sup>N</sup>, where N is the width of T in bits.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_sub` method. For example,
/// [`std::u32::wrapping_sub`](../../std/primitive.u32.html#method.wrapping_sub)
#[cfg(not(bootstrap))]
#[cfg(not(boostrap_stdarch_ignore_this))]
pub fn wrapping_sub<T>(a: T, b: T) -> T;
/// Returns (a * b) mod 2<sup>N</sup>, where N is the width of T in bits.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_mul` method. For example,
/// [`std::u32::wrapping_mul`](../../std/primitive.u32.html#method.wrapping_mul)
#[cfg(not(bootstrap))]
#[cfg(not(boostrap_stdarch_ignore_this))]
pub fn wrapping_mul<T>(a: T, b: T) -> T;

/// Computes `a + b`, while saturating at numeric bounds.
24 changes: 12 additions & 12 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
@@ -1112,11 +1112,11 @@ $EndFeature, "
without modifying the original"]
#[inline]
pub const fn wrapping_add(self, rhs: Self) -> Self {
#[cfg(bootstrap)] {
#[cfg(boostrap_stdarch_ignore_this)] {
intrinsics::overflowing_add(self, rhs)
}

#[cfg(not(bootstrap))] {
#[cfg(not(boostrap_stdarch_ignore_this))] {
intrinsics::wrapping_add(self, rhs)
}
}
@@ -1141,11 +1141,11 @@ $EndFeature, "
without modifying the original"]
#[inline]
pub const fn wrapping_sub(self, rhs: Self) -> Self {
#[cfg(bootstrap)] {
#[cfg(boostrap_stdarch_ignore_this)] {
intrinsics::overflowing_sub(self, rhs)
}

#[cfg(not(bootstrap))] {
#[cfg(not(boostrap_stdarch_ignore_this))] {
intrinsics::wrapping_sub(self, rhs)
}
}
@@ -1169,11 +1169,11 @@ $EndFeature, "
without modifying the original"]
#[inline]
pub const fn wrapping_mul(self, rhs: Self) -> Self {
#[cfg(bootstrap)] {
#[cfg(boostrap_stdarch_ignore_this)] {
intrinsics::overflowing_mul(self, rhs)
}

#[cfg(not(bootstrap))] {
#[cfg(not(boostrap_stdarch_ignore_this))] {
intrinsics::wrapping_mul(self, rhs)
}
}
@@ -3049,11 +3049,11 @@ $EndFeature, "
without modifying the original"]
#[inline]
pub const fn wrapping_add(self, rhs: Self) -> Self {
#[cfg(bootstrap)] {
#[cfg(boostrap_stdarch_ignore_this)] {
intrinsics::overflowing_add(self, rhs)
}

#[cfg(not(bootstrap))] {
#[cfg(not(boostrap_stdarch_ignore_this))] {
intrinsics::wrapping_add(self, rhs)
}
}
@@ -3077,11 +3077,11 @@ $EndFeature, "
without modifying the original"]
#[inline]
pub const fn wrapping_sub(self, rhs: Self) -> Self {
#[cfg(bootstrap)] {
#[cfg(boostrap_stdarch_ignore_this)] {
intrinsics::overflowing_sub(self, rhs)
}

#[cfg(not(bootstrap))] {
#[cfg(not(boostrap_stdarch_ignore_this))] {
intrinsics::wrapping_sub(self, rhs)
}
}
@@ -3106,11 +3106,11 @@ $EndFeature, "
without modifying the original"]
#[inline]
pub const fn wrapping_mul(self, rhs: Self) -> Self {
#[cfg(bootstrap)] {
#[cfg(boostrap_stdarch_ignore_this)] {
intrinsics::overflowing_mul(self, rhs)
}

#[cfg(not(bootstrap))] {
#[cfg(not(boostrap_stdarch_ignore_this))] {
intrinsics::wrapping_mul(self, rhs)
}
}