diff options
| author | bors <bors@rust-lang.org> | 2015-01-18 05:48:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-18 05:48:56 +0000 |
| commit | a833337943300db1c310a4cf9c84b7b4ef4e9468 (patch) | |
| tree | 7834caf30f35c3ac85ea122333b7ba7c07cc767c /src/libstd | |
| parent | 6da8827482418b6ee89eaf3c66b8693c4cc649e8 (diff) | |
| parent | 8b2335a01d000300cca7d8b12210e605424eedb4 (diff) | |
| download | rust-a833337943300db1c310a4cf9c84b7b4ef4e9468.tar.gz rust-a833337943300db1c310a4cf9c84b7b4ef4e9468.zip | |
auto merge of #21288 : brson/rust/snaps, r=alexcrichton
This fixes the issues mentioned in https://github.com/rust-lang/rust/pull/21236, as well as the one https://github.com/rust-lang/rust/issues/21230 where `CFG_BOOTSTRAP_KEY` was being set to simply 'N'. It changes the build such that `RUSTC_BOOTSTRAP_KEY` is only exported on -beta and -stable, so that the behavior of the -dev, -nightly, and snapshot compilers is the same everywhere. Haven't run it completely through 'make check' yet, but the I have verified that the aforementioned issues are fixed. r? @alexcrichton cc @eddyb
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/num/mod.rs | 42 | ||||
| -rw-r--r-- | src/libstd/rand/mod.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/common/backtrace.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/c.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/stack_overflow.rs | 6 |
6 files changed, 24 insertions, 38 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 2553bbdf523..ddb8129630f 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -112,6 +112,8 @@ #![feature(old_impl_check)] #![feature(optin_builtin_traits)] #![feature(int_uint)] +#![feature(int_uint)] +#![allow(unstable)] // Don't link to std. We are std. #![no_std] diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index e804408b4d0..3432767d6cd 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -424,14 +424,12 @@ mod tests { assert_eq!(int::MIN.to_u32(), None); assert_eq!(int::MIN.to_u64(), None); - #[cfg(any(all(stage0, target_word_size = "32"), - all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] fn check_word_size() { assert_eq!(int::MIN.to_i32(), Some(int::MIN as i32)); } - #[cfg(any(all(stage0, target_word_size = "64"), - all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] fn check_word_size() { assert_eq!(int::MIN.to_i32(), None); } @@ -494,14 +492,12 @@ mod tests { assert_eq!(i64::MIN.to_u32(), None); assert_eq!(i64::MIN.to_u64(), None); - #[cfg(any(all(stage0, target_word_size = "32"), - all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] fn check_word_size() { assert_eq!(i64::MIN.to_int(), None); } - #[cfg(any(all(stage0, target_word_size = "64"), - all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] fn check_word_size() { assert_eq!(i64::MIN.to_int(), Some(i64::MIN as int)); } @@ -521,15 +517,13 @@ mod tests { // int::MAX.to_u32() is word-size specific assert_eq!(int::MAX.to_u64(), Some(int::MAX as u64)); - #[cfg(any(all(stage0, target_word_size = "32"), - all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] fn check_word_size() { assert_eq!(int::MAX.to_i32(), Some(int::MAX as i32)); assert_eq!(int::MAX.to_u32(), Some(int::MAX as u32)); } - #[cfg(any(all(stage0, target_word_size = "64"), - all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] fn check_word_size() { assert_eq!(int::MAX.to_i32(), None); assert_eq!(int::MAX.to_u32(), None); @@ -593,15 +587,13 @@ mod tests { assert_eq!(i64::MAX.to_u32(), None); assert_eq!(i64::MAX.to_u64(), Some(i64::MAX as u64)); - #[cfg(any(all(stage0, target_word_size = "32"), - all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] fn check_word_size() { assert_eq!(i64::MAX.to_int(), None); assert_eq!(i64::MAX.to_uint(), None); } - #[cfg(any(all(stage0, target_word_size = "64"), - all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] fn check_word_size() { assert_eq!(i64::MAX.to_int(), Some(i64::MAX as int)); assert_eq!(i64::MAX.to_uint(), Some(i64::MAX as uint)); @@ -692,15 +684,13 @@ mod tests { // uint::MAX.to_u32() is word-size specific assert_eq!(uint::MAX.to_u64(), Some(uint::MAX as u64)); - #[cfg(any(all(stage0, target_word_size = "32"), - all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] fn check_word_size() { assert_eq!(uint::MAX.to_u32(), Some(uint::MAX as u32)); assert_eq!(uint::MAX.to_i64(), Some(uint::MAX as i64)); } - #[cfg(any(all(stage0, target_word_size = "64"), - all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] fn check_word_size() { assert_eq!(uint::MAX.to_u32(), None); assert_eq!(uint::MAX.to_i64(), None); @@ -750,14 +740,12 @@ mod tests { assert_eq!(u32::MAX.to_u32(), Some(u32::MAX as u32)); assert_eq!(u32::MAX.to_u64(), Some(u32::MAX as u64)); - #[cfg(any(all(stage0, target_word_size = "32"), - all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] fn check_word_size() { assert_eq!(u32::MAX.to_int(), None); } - #[cfg(any(all(stage0, target_word_size = "64"), - all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] fn check_word_size() { assert_eq!(u32::MAX.to_int(), Some(u32::MAX as int)); } @@ -778,14 +766,12 @@ mod tests { assert_eq!(u64::MAX.to_u32(), None); assert_eq!(u64::MAX.to_u64(), Some(u64::MAX as u64)); - #[cfg(any(all(stage0, target_word_size = "32"), - all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] fn check_word_size() { assert_eq!(u64::MAX.to_uint(), None); } - #[cfg(any(all(stage0, target_word_size = "64"), - all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] fn check_word_size() { assert_eq!(u64::MAX.to_uint(), Some(u64::MAX as uint)); } diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs index 8130a6c82ec..23387d29553 100644 --- a/src/libstd/rand/mod.rs +++ b/src/libstd/rand/mod.rs @@ -230,9 +230,9 @@ use rc::Rc; use result::Result::{Ok, Err}; use vec::Vec; -#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))] +#[cfg(target_pointer_width = "32")] use core_rand::IsaacRng as IsaacWordRng; -#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))] +#[cfg(target_pointer_width = "64")] use core_rand::Isaac64Rng as IsaacWordRng; pub use core_rand::{Rand, Rng, SeedableRng, Open01, Closed01}; diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs index f6161ec193d..d8b85987236 100644 --- a/src/libstd/sys/common/backtrace.rs +++ b/src/libstd/sys/common/backtrace.rs @@ -12,10 +12,10 @@ use prelude::v1::*; use io::IoResult; -#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))] +#[cfg(target_pointer_width = "64")] pub const HEX_WIDTH: uint = 18; -#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))] +#[cfg(target_pointer_width = "32")] pub const HEX_WIDTH: uint = 10; // All rust symbols are in theory lists of "::"-separated identifiers. Some diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs index fed700cc9d5..9016d1a2c99 100644 --- a/src/libstd/sys/unix/c.rs +++ b/src/libstd/sys/unix/c.rs @@ -173,13 +173,13 @@ mod signal { unsafe impl ::marker::Sync for sigaction { } #[repr(C)] - #[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] pub struct sigset_t { __val: [libc::c_ulong; 32], } #[repr(C)] - #[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] pub struct sigset_t { __val: [libc::c_ulong; 16], } diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs index 45680f52e73..2b5ced5085b 100644 --- a/src/libstd/sys/unix/stack_overflow.rs +++ b/src/libstd/sys/unix/stack_overflow.rs @@ -183,14 +183,12 @@ mod imp { sa_restorer: *mut libc::c_void, } - #[cfg(any(all(stage0, target_word_size = "32"), - all(not(stage0), target_pointer_width = "32")))] + #[cfg(target_pointer_width = "32")] #[repr(C)] pub struct sigset_t { __val: [libc::c_ulong; 32], } - #[cfg(any(all(stage0, target_word_size = "64"), - all(not(stage0), target_pointer_width = "64")))] + #[cfg(target_pointer_width = "64")] #[repr(C)] pub struct sigset_t { __val: [libc::c_ulong; 16], |
