Register new snapshots.

This commit is contained in:
Eduard Burtescu 2015-01-16 17:01:02 +02:00 committed by Brian Anderson
parent f4f10dba29
commit 89b80faa8e
29 changed files with 182 additions and 486 deletions

View File

@ -333,7 +333,6 @@ export CFG_DISABLE_UNSTABLE_FEATURES
endif
# Subvert unstable feature lints to do the self-build
export CFG_BOOTSTRAP_KEY
export RUSTC_BOOTSTRAP_KEY:=$(CFG_BOOTSTRAP_KEY)
######################################################################
# Per-stage targets and runner
@ -404,8 +403,13 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
ifeq ($(1),0)
# Don't run the stage0 compiler under valgrind - that ship has sailed
CFG_VALGRIND_COMPILE$(1) =
# FIXME(21230) HACK Extract the key from the snapshot
CFG_BOOSTRAP_KEY_ENV$(1) = RUSTC_BOOTSTRAP_KEY=$$$$((grep -a 'save analysis[0-9]' \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) || echo N) |\
sed 's/.*save analysis\([0-9]*\).*/\1/')
else
CFG_VALGRIND_COMPILE$(1) = $$(CFG_VALGRIND_COMPILE)
CFG_BOOSTRAP_KEY_ENV$(1) = RUSTC_BOOTSTRAP_KEY=$$(CFG_BOOTSTRAP_KEY)
endif
# Add RUSTFLAGS_STAGEN values to the build command
@ -478,6 +482,7 @@ STAGE$(1)_T_$(2)_H_$(3) := \
$$(Q)$$(RPATH_VAR$(1)_T_$(2)_H_$(3)) \
$$(call CFG_RUN_TARG_$(3),$(1), \
$$(CFG_VALGRIND_COMPILE$(1)) \
$$(CFG_BOOSTRAP_KEY_ENV$(1)) \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \

View File

@ -117,14 +117,6 @@ impl<T: ?Sized + Ord> Ord for Box<T> {
#[stable]
impl<T: ?Sized + Eq> Eq for Box<T> {}
#[cfg(stage0)]
impl<S: hash::Writer, T: ?Sized + Hash<S>> Hash<S> for Box<T> {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
#[cfg(not(stage0))]
impl<S: hash::Hasher, T: ?Sized + Hash<S>> Hash<S> for Box<T> {
#[inline]
fn hash(&self, state: &mut S) {

View File

@ -686,14 +686,6 @@ impl<T: Ord> Ord for Rc<T> {
}
// FIXME (#18248) Make `T` `Sized?`
#[cfg(stage0)]
impl<S: hash::Writer, T: Hash<S>> Hash<S> for Rc<T> {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
#[cfg(not(stage0))]
impl<S: hash::Hasher, T: Hash<S>> Hash<S> for Rc<T> {
#[inline]
fn hash(&self, state: &mut S) {

View File

@ -24,8 +24,6 @@ use core::cmp::Ordering;
use core::default::Default;
use core::fmt::Show;
use core::hash::{Hash, Hasher};
#[cfg(stage0)]
use core::hash::Writer;
use core::iter::{Map, FromIterator};
use core::ops::{Index, IndexMut};
use core::{iter, fmt, mem};
@ -822,16 +820,6 @@ impl<K: Ord, V> Extend<(K, V)> for BTreeMap<K, V> {
}
#[stable]
#[cfg(stage0)]
impl<S: Writer, K: Hash<S>, V: Hash<S>> Hash<S> for BTreeMap<K, V> {
fn hash(&self, state: &mut S) {
for elt in self.iter() {
elt.hash(state);
}
}
}
#[stable]
#[cfg(not(stage0))]
impl<S: Hasher, K: Hash<S>, V: Hash<S>> Hash<S> for BTreeMap<K, V> {
fn hash(&self, state: &mut S) {
for elt in self.iter() {

View File

@ -830,15 +830,6 @@ impl fmt::Show for String {
}
#[unstable = "waiting on Hash stabilization"]
#[cfg(stage0)]
impl<H: hash::Writer> hash::Hash<H> for String {
#[inline]
fn hash(&self, hasher: &mut H) {
(**self).hash(hasher)
}
}
#[unstable = "waiting on Hash stabilization"]
#[cfg(not(stage0))]
impl<H: hash::Writer + hash::Hasher> hash::Hash<H> for String {
#[inline]
fn hash(&self, hasher: &mut H) {

View File

@ -1185,14 +1185,6 @@ impl<T:Clone> Clone for Vec<T> {
}
}
#[cfg(stage0)]
impl<S: hash::Writer, T: Hash<S>> Hash<S> for Vec<T> {
#[inline]
fn hash(&self, state: &mut S) {
self.as_slice().hash(state);
}
}
#[cfg(not(stage0))]
impl<S: hash::Writer + hash::Hasher, T: Hash<S>> Hash<S> for Vec<T> {
#[inline]
fn hash(&self, state: &mut S) {

View File

@ -180,25 +180,6 @@ impl<'a> Arguments<'a> {
/// unsafety, but will ignore invalid .
#[doc(hidden)] #[inline]
#[unstable = "implementation detail of the `format_args!` macro"]
#[cfg(stage0)] // SNAP 9e4e524
pub fn with_placeholders(pieces: &'a [&'a str],
fmt: &'a [rt::Argument<'a>],
args: &'a [Argument<'a>]) -> Arguments<'a> {
Arguments {
pieces: pieces,
fmt: Some(fmt),
args: args
}
}
/// This function is used to specify nonstandard formatting parameters.
/// The `pieces` array must be at least as long as `fmt` to construct
/// a valid Arguments structure. Also, any `Count` within `fmt` that is
/// `CountIsParam` or `CountIsNextParam` has to point to an argument
/// created with `argumentuint`. However, failing to do so doesn't cause
/// unsafety, but will ignore invalid .
#[doc(hidden)] #[inline]
#[unstable = "implementation detail of the `format_args!` macro"]
#[cfg(not(stage0))]
pub fn with_placeholders(pieces: &'a [&'a str],
fmt: &'a [rt::Argument],
args: &'a [Argument<'a>]) -> Arguments<'a> {
@ -226,10 +207,6 @@ pub struct Arguments<'a> {
pieces: &'a [&'a str],
// Placeholder specs, or `None` if all specs are default (as in "{}{}").
// SNAP 9e4e524
#[cfg(stage0)]
fmt: Option<&'a [rt::Argument<'a>]>,
#[cfg(not(stage0))]
fmt: Option<&'a [rt::Argument]>,
// Dynamic arguments for interpolation, to be interleaved with string

View File

@ -21,21 +21,12 @@ pub use self::Count::*;
pub use self::Position::*;
pub use self::Flag::*;
// SNAP 9e4e524
#[doc(hidden)]
#[derive(Copy)]
#[cfg(not(stage0))]
pub struct Argument {
pub position: Position,
pub format: FormatSpec,
}
#[doc(hidden)]
#[derive(Copy)]
#[cfg(stage0)]
pub struct Argument<'a> {
pub position: Position,
pub format: FormatSpec,
}
#[doc(hidden)]
#[derive(Copy)]

View File

@ -58,7 +58,13 @@
#![unstable = "module was recently redesigned"]
use prelude::*;
use borrow::{Cow, ToOwned};
use default::Default;
use intrinsics::TypeId;
use mem;
use num::Int;
pub use self::sip::SipHasher;
@ -70,19 +76,6 @@ mod sip;
/// to compute the hash. Specific implementations of this trait may specialize
/// for particular instances of `H` in order to be able to optimize the hashing
/// behavior.
#[cfg(stage0)]
pub trait Hash<H> {
/// Feeds this value into the state given, updating the hasher as necessary.
fn hash(&self, state: &mut H);
}
/// A hashable type.
///
/// The `H` type parameter is an abstract hash state that is used by the `Hash`
/// to compute the hash. Specific implementations of this trait may specialize
/// for particular instances of `H` in order to be able to optimize the hashing
/// behavior.
#[cfg(not(stage0))]
pub trait Hash<H: Hasher> {
/// Feeds this value into the state given, updating the hasher as necessary.
fn hash(&self, state: &mut H);
@ -121,314 +114,147 @@ pub fn hash<T: Hash<H>, H: Hasher + Default>(value: &T) -> H::Output {
//////////////////////////////////////////////////////////////////////////////
#[cfg(stage0)]
mod impls {
use prelude::*;
use borrow::{Cow, ToOwned};
use intrinsics::TypeId;
use mem;
use super::{Hash, Writer};
use num::Int;
macro_rules! impl_hash {
($ty:ident, $uty:ident) => {
impl<S: Writer> Hash<S> for $ty {
#[inline]
fn hash(&self, state: &mut S) {
let a: [u8; ::$ty::BYTES] = unsafe {
mem::transmute((*self as $uty).to_le() as $ty)
};
state.write(a.as_slice())
}
macro_rules! impl_hash {
($ty:ident, $uty:ident) => {
impl<S: Writer + Hasher> Hash<S> for $ty {
#[inline]
fn hash(&self, state: &mut S) {
let a: [u8; ::$ty::BYTES] = unsafe {
mem::transmute((*self as $uty).to_le() as $ty)
};
state.write(a.as_slice())
}
}
}
impl_hash! { u8, u8 }
impl_hash! { u16, u16 }
impl_hash! { u32, u32 }
impl_hash! { u64, u64 }
impl_hash! { uint, uint }
impl_hash! { i8, u8 }
impl_hash! { i16, u16 }
impl_hash! { i32, u32 }
impl_hash! { i64, u64 }
impl_hash! { int, uint }
impl<S: Writer> Hash<S> for bool {
#[inline]
fn hash(&self, state: &mut S) {
(*self as u8).hash(state);
}
}
impl<S: Writer> Hash<S> for char {
#[inline]
fn hash(&self, state: &mut S) {
(*self as u32).hash(state);
}
}
impl<S: Writer> Hash<S> for str {
#[inline]
fn hash(&self, state: &mut S) {
state.write(self.as_bytes());
0xffu8.hash(state)
}
}
macro_rules! impl_hash_tuple {
() => (
impl<S> Hash<S> for () {
#[inline]
fn hash(&self, _state: &mut S) {}
}
);
( $($name:ident)+) => (
impl<S, $($name: Hash<S>),*> Hash<S> for ($($name,)*) {
#[inline]
#[allow(non_snake_case)]
fn hash(&self, state: &mut S) {
match *self {
($(ref $name,)*) => {
$(
$name.hash(state);
)*
}
}
}
}
);
}
impl_hash_tuple! {}
impl_hash_tuple! { A }
impl_hash_tuple! { A B }
impl_hash_tuple! { A B C }
impl_hash_tuple! { A B C D }
impl_hash_tuple! { A B C D E }
impl_hash_tuple! { A B C D E F }
impl_hash_tuple! { A B C D E F G }
impl_hash_tuple! { A B C D E F G H }
impl_hash_tuple! { A B C D E F G H I }
impl_hash_tuple! { A B C D E F G H I J }
impl_hash_tuple! { A B C D E F G H I J K }
impl_hash_tuple! { A B C D E F G H I J K L }
impl<S: Writer, T: Hash<S>> Hash<S> for [T] {
#[inline]
fn hash(&self, state: &mut S) {
self.len().hash(state);
for elt in self.iter() {
elt.hash(state);
}
}
}
impl<'a, S, T: ?Sized + Hash<S>> Hash<S> for &'a T {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
impl<'a, S, T: ?Sized + Hash<S>> Hash<S> for &'a mut T {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
impl<S: Writer, T> Hash<S> for *const T {
#[inline]
fn hash(&self, state: &mut S) {
// NB: raw-pointer Hash does _not_ dereference
// to the target; it just gives you the pointer-bytes.
(*self as uint).hash(state);
}
}
impl<S: Writer, T> Hash<S> for *mut T {
#[inline]
fn hash(&self, state: &mut S) {
// NB: raw-pointer Hash does _not_ dereference
// to the target; it just gives you the pointer-bytes.
(*self as uint).hash(state);
}
}
impl<S: Writer> Hash<S> for TypeId {
#[inline]
fn hash(&self, state: &mut S) {
self.hash().hash(state)
}
}
impl<'a, T, B: ?Sized, S> Hash<S> for Cow<'a, T, B>
where B: Hash<S> + ToOwned<T>
{
#[inline]
fn hash(&self, state: &mut S) {
Hash::hash(&**self, state)
}
}
}
#[cfg(not(stage0))]
mod impls {
use prelude::*;
impl_hash! { u8, u8 }
impl_hash! { u16, u16 }
impl_hash! { u32, u32 }
impl_hash! { u64, u64 }
impl_hash! { uint, uint }
impl_hash! { i8, u8 }
impl_hash! { i16, u16 }
impl_hash! { i32, u32 }
impl_hash! { i64, u64 }
impl_hash! { int, uint }
use borrow::{Cow, ToOwned};
use intrinsics::TypeId;
use mem;
use super::{Hash, Writer, Hasher};
use num::Int;
macro_rules! impl_hash {
($ty:ident, $uty:ident) => {
impl<S: Writer + Hasher> Hash<S> for $ty {
#[inline]
fn hash(&self, state: &mut S) {
let a: [u8; ::$ty::BYTES] = unsafe {
mem::transmute((*self as $uty).to_le() as $ty)
};
state.write(a.as_slice())
}
}
}
impl<S: Writer + Hasher> Hash<S> for bool {
#[inline]
fn hash(&self, state: &mut S) {
(*self as u8).hash(state);
}
}
impl_hash! { u8, u8 }
impl_hash! { u16, u16 }
impl_hash! { u32, u32 }
impl_hash! { u64, u64 }
impl_hash! { uint, uint }
impl_hash! { i8, u8 }
impl_hash! { i16, u16 }
impl_hash! { i32, u32 }
impl_hash! { i64, u64 }
impl_hash! { int, uint }
impl<S: Writer + Hasher> Hash<S> for bool {
#[inline]
fn hash(&self, state: &mut S) {
(*self as u8).hash(state);
}
impl<S: Writer + Hasher> Hash<S> for char {
#[inline]
fn hash(&self, state: &mut S) {
(*self as u32).hash(state);
}
}
impl<S: Writer + Hasher> Hash<S> for char {
#[inline]
fn hash(&self, state: &mut S) {
(*self as u32).hash(state);
}
impl<S: Writer + Hasher> Hash<S> for str {
#[inline]
fn hash(&self, state: &mut S) {
state.write(self.as_bytes());
0xffu8.hash(state)
}
}
impl<S: Writer + Hasher> Hash<S> for str {
#[inline]
fn hash(&self, state: &mut S) {
state.write(self.as_bytes());
0xffu8.hash(state)
macro_rules! impl_hash_tuple {
() => (
impl<S: Hasher> Hash<S> for () {
#[inline]
fn hash(&self, _state: &mut S) {}
}
}
);
macro_rules! impl_hash_tuple {
() => (
impl<S: Hasher> Hash<S> for () {
#[inline]
fn hash(&self, _state: &mut S) {}
}
);
( $($name:ident)+) => (
impl<S: Hasher, $($name: Hash<S>),*> Hash<S> for ($($name,)*) {
#[inline]
#[allow(non_snake_case)]
fn hash(&self, state: &mut S) {
match *self {
($(ref $name,)*) => {
$(
$name.hash(state);
)*
}
( $($name:ident)+) => (
impl<S: Hasher, $($name: Hash<S>),*> Hash<S> for ($($name,)*) {
#[inline]
#[allow(non_snake_case)]
fn hash(&self, state: &mut S) {
match *self {
($(ref $name,)*) => {
$(
$name.hash(state);
)*
}
}
}
);
}
impl_hash_tuple! {}
impl_hash_tuple! { A }
impl_hash_tuple! { A B }
impl_hash_tuple! { A B C }
impl_hash_tuple! { A B C D }
impl_hash_tuple! { A B C D E }
impl_hash_tuple! { A B C D E F }
impl_hash_tuple! { A B C D E F G }
impl_hash_tuple! { A B C D E F G H }
impl_hash_tuple! { A B C D E F G H I }
impl_hash_tuple! { A B C D E F G H I J }
impl_hash_tuple! { A B C D E F G H I J K }
impl_hash_tuple! { A B C D E F G H I J K L }
impl<S: Writer + Hasher, T: Hash<S>> Hash<S> for [T] {
#[inline]
fn hash(&self, state: &mut S) {
self.len().hash(state);
for elt in self.iter() {
elt.hash(state);
}
}
}
);
}
impl_hash_tuple! {}
impl_hash_tuple! { A }
impl_hash_tuple! { A B }
impl_hash_tuple! { A B C }
impl_hash_tuple! { A B C D }
impl_hash_tuple! { A B C D E }
impl_hash_tuple! { A B C D E F }
impl_hash_tuple! { A B C D E F G }
impl_hash_tuple! { A B C D E F G H }
impl_hash_tuple! { A B C D E F G H I }
impl_hash_tuple! { A B C D E F G H I J }
impl_hash_tuple! { A B C D E F G H I J K }
impl_hash_tuple! { A B C D E F G H I J K L }
impl<'a, S: Hasher, T: ?Sized + Hash<S>> Hash<S> for &'a T {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
impl<'a, S: Hasher, T: ?Sized + Hash<S>> Hash<S> for &'a mut T {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
impl<S: Writer + Hasher, T> Hash<S> for *const T {
#[inline]
fn hash(&self, state: &mut S) {
// NB: raw-pointer Hash does _not_ dereference
// to the target; it just gives you the pointer-bytes.
(*self as uint).hash(state);
}
}
impl<S: Writer + Hasher, T> Hash<S> for *mut T {
#[inline]
fn hash(&self, state: &mut S) {
// NB: raw-pointer Hash does _not_ dereference
// to the target; it just gives you the pointer-bytes.
(*self as uint).hash(state);
}
}
impl<S: Writer + Hasher> Hash<S> for TypeId {
#[inline]
fn hash(&self, state: &mut S) {
self.hash().hash(state)
}
}
impl<'a, T, B: ?Sized, S: Hasher> Hash<S> for Cow<'a, T, B>
where B: Hash<S> + ToOwned<T>
{
#[inline]
fn hash(&self, state: &mut S) {
Hash::hash(&**self, state)
impl<S: Writer + Hasher, T: Hash<S>> Hash<S> for [T] {
#[inline]
fn hash(&self, state: &mut S) {
self.len().hash(state);
for elt in self.iter() {
elt.hash(state);
}
}
}
impl<'a, S: Hasher, T: ?Sized + Hash<S>> Hash<S> for &'a T {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
impl<'a, S: Hasher, T: ?Sized + Hash<S>> Hash<S> for &'a mut T {
#[inline]
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
impl<S: Writer + Hasher, T> Hash<S> for *const T {
#[inline]
fn hash(&self, state: &mut S) {
// NB: raw-pointer Hash does _not_ dereference
// to the target; it just gives you the pointer-bytes.
(*self as uint).hash(state);
}
}
impl<S: Writer + Hasher, T> Hash<S> for *mut T {
#[inline]
fn hash(&self, state: &mut S) {
// NB: raw-pointer Hash does _not_ dereference
// to the target; it just gives you the pointer-bytes.
(*self as uint).hash(state);
}
}
impl<S: Writer + Hasher> Hash<S> for TypeId {
#[inline]
fn hash(&self, state: &mut S) {
self.hash().hash(state)
}
}
impl<'a, T, B: ?Sized, S: Hasher> Hash<S> for Cow<'a, T, B>
where B: Hash<S> + ToOwned<T>
{
#[inline]
fn hash(&self, state: &mut S) {
Hash::hash(&**self, state)
}
}

View File

@ -42,7 +42,6 @@
#![unstable]
#![allow(missing_docs)]
#[cfg(not(stage0))]
use marker::Sized;
pub type GlueFn = extern "Rust" fn(*const i8);
@ -207,12 +206,8 @@ extern "rust-intrinsic" {
/// Gets an identifier which is globally unique to the specified type. This
/// function will return the same value for a type regardless of whichever
/// crate it is invoked in.
#[cfg(not(stage0))]
pub fn type_id<T: ?Sized + 'static>() -> TypeId;
#[cfg(stage0)]
pub fn type_id<T: 'static>() -> TypeId;
/// Create a value initialized to zero.
///
/// `init` is unsafe because it returns a zeroed-out datum,
@ -562,15 +557,9 @@ pub struct TypeId {
impl TypeId {
/// Returns the `TypeId` of the type this generic function has been instantiated with
#[cfg(not(stage0))]
pub fn of<T: ?Sized + 'static>() -> TypeId {
unsafe { type_id::<T>() }
}
#[cfg(stage0)]
pub fn of<T: 'static>() -> TypeId {
unsafe { type_id::<T>() }
}
pub fn hash(&self) -> u64 { self.t }
}

View File

@ -2753,9 +2753,9 @@ macro_rules! step_impl_no_between {
}
step_impl!(uint u8 u16 u32 int i8 i16 i32);
#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))]
#[cfg(target_pointer_width = "64")]
step_impl!(u64 i64);
#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))]
#[cfg(target_pointer_width = "32")]
step_impl_no_between!(u64 i64);

View File

@ -58,7 +58,6 @@
#![no_std]
#![allow(unknown_features, raw_pointer_derive)]
#![cfg_attr(stage0, allow(unused_attributes))]
#![allow(unknown_features)] #![feature(intrinsics, lang_items)]
#![feature(simd, unsafe_destructor, slicing_syntax)]
#![feature(unboxed_closures)]

View File

@ -16,8 +16,5 @@
#![deprecated = "replaced by isize"]
#[cfg(stage0)] #[cfg(target_word_size = "32")] int_module! { int, 32 }
#[cfg(stage0)] #[cfg(target_word_size = "64")] int_module! { int, 64 }
#[cfg(not(stage0))] #[cfg(target_pointer_width = "32")] int_module! { int, 32 }
#[cfg(not(stage0))] #[cfg(target_pointer_width = "64")] int_module! { int, 64 }
#[cfg(target_pointer_width = "32")] int_module! { int, 32 }
#[cfg(target_pointer_width = "64")] int_module! { int, 64 }

View File

@ -17,9 +17,7 @@
#![stable]
#![doc(primitive = "isize")]
#[cfg(any(all(stage0, target_word_size = "32"),
all(not(stage0), target_pointer_width = "32")))]
#[cfg(target_pointer_width = "32")]
int_module! { isize, 32 }
#[cfg(any(all(stage0, target_word_size = "64"),
all(not(stage0), target_pointer_width = "64")))]
#[cfg(target_pointer_width = "64")]
int_module! { isize, 64 }

View File

@ -496,7 +496,7 @@ uint_impl! { u64 = u64, 64,
intrinsics::u64_sub_with_overflow,
intrinsics::u64_mul_with_overflow }
#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))]
#[cfg(target_pointer_width = "32")]
uint_impl! { uint = u32, 32,
intrinsics::ctpop32,
intrinsics::ctlz32,
@ -506,7 +506,7 @@ uint_impl! { uint = u32, 32,
intrinsics::u32_sub_with_overflow,
intrinsics::u32_mul_with_overflow }
#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))]
#[cfg(target_pointer_width = "64")]
uint_impl! { uint = u64, 64,
intrinsics::ctpop64,
intrinsics::ctlz64,
@ -601,13 +601,13 @@ int_impl! { i64 = i64, u64, 64,
intrinsics::i64_sub_with_overflow,
intrinsics::i64_mul_with_overflow }
#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))]
#[cfg(target_pointer_width = "32")]
int_impl! { int = i32, u32, 32,
intrinsics::i32_add_with_overflow,
intrinsics::i32_sub_with_overflow,
intrinsics::i32_mul_with_overflow }
#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))]
#[cfg(target_pointer_width = "64")]
int_impl! { int = i64, u64, 64,
intrinsics::i64_add_with_overflow,
intrinsics::i64_sub_with_overflow,

View File

@ -719,8 +719,6 @@ macro_rules! shl_impl {
)
}
// SNAP 9e4e524e0
#[cfg(not(stage0))]
macro_rules! shl_impl_all {
($($t:ty)*) => ($(
shl_impl! { $t, u8 }
@ -737,13 +735,6 @@ macro_rules! shl_impl_all {
)*)
}
#[cfg(stage0)]
macro_rules! shl_impl_all {
($($t:ty)*) => ($(
shl_impl! { $t, usize }
)*)
}
shl_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// The `Shr` trait is used to specify the functionality of `>>`.
@ -798,8 +789,6 @@ macro_rules! shr_impl {
)
}
// SNAP 9e4e524e0
#[cfg(not(stage0))]
macro_rules! shr_impl_all {
($($t:ty)*) => ($(
shr_impl! { $t, u8 }
@ -816,13 +805,6 @@ macro_rules! shr_impl_all {
)*)
}
#[cfg(stage0)]
macro_rules! shr_impl_all {
($($t:ty)*) => ($(
shr_impl! { $t, usize }
)*)
}
shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// The `Index` trait is used to specify the functionality of indexing operations

View File

@ -274,12 +274,12 @@ fn find_libdir(sysroot: &Path) -> String {
}
}
#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))]
#[cfg(target_pointer_width = "64")]
fn primary_libdir_name() -> String {
"lib64".to_string()
}
#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))]
#[cfg(target_pointer_width = "32")]
fn primary_libdir_name() -> String {
"lib32".to_string()
}

View File

@ -947,13 +947,6 @@ impl<'tcx> PartialEq for TyS<'tcx> {
}
impl<'tcx> Eq for TyS<'tcx> {}
#[cfg(stage0)]
impl<'tcx, S: Writer> Hash<S> for TyS<'tcx> {
fn hash(&self, s: &mut S) {
(self as *const _).hash(s)
}
}
#[cfg(not(stage0))]
impl<'tcx, S: Writer + Hasher> Hash<S> for TyS<'tcx> {
fn hash(&self, s: &mut S) {
(self as *const _).hash(s)

View File

@ -24,7 +24,6 @@ Core encoding and decoding interfaces.
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
#![allow(unknown_features)]
#![cfg_attr(stage0, allow(unused_attributes))]
#![feature(box_syntax)]
#![feature(old_impl_check)]
#![feature(slicing_syntax)]

View File

@ -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));
}

View File

@ -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};

View File

@ -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

View File

@ -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],
}

View File

@ -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],

View File

@ -38,7 +38,6 @@
use std::fmt::{self, Show};
use std::hash::{Hash, Hasher};
#[cfg(stage0)] use std::hash::Writer;
use std::ops::Deref;
use std::ptr;
@ -107,13 +106,6 @@ impl<T: Show> Show for P<T> {
}
}
#[cfg(stage0)]
impl<S: Writer, T: Hash<S>> Hash<S> for P<T> {
fn hash(&self, state: &mut S) {
(**self).hash(state);
}
}
#[cfg(not(stage0))]
impl<S: Hasher, T: Hash<S>> Hash<S> for P<T> {
fn hash(&self, state: &mut S) {
(**self).hash(state);

View File

@ -1,3 +1,12 @@
S 2015-01-15 9ade482
freebsd-x86_64 eb8f52c6e8dc24a293456d5e4dc5d1072442e758
linux-i386 0197ad7179d74eba06a8b46432548caf226aa03d
linux-x86_64 03459f8b216e96ed8b9abe25a42a75859195103d
macos-i386 b5c004883ddff84159f11a3329cde682e0b7f75b
macos-x86_64 b69ea42e1c995682adf0390ed4ef8a762c001a4e
winnt-i386 7fa6e35d26bbffa3888d440a0d5f116414ef8c0a
winnt-x86_64 ac04a4f1f26e0219d91e7eae6f580ca3cfee4231
S 2015-01-07 9e4e524
freebsd-x86_64 2563d33151bce1bbe08a85d712564bddc7503fc6
linux-i386 d8b73fc9aa3ad72ce1408a41e35d78dba10eb4d4

View File

@ -12,12 +12,12 @@
// FIXME: work properly with higher limits
#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))]
#[cfg(target_pointer_width = "32")]
fn main() {
let big: Option<[u32; (1<<29)-1]> = None;
}
#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))]
#[cfg(target_pointer_width = "64")]
fn main() {
let big: Option<[u32; (1<<45)-1]> = None;
}

View File

@ -13,14 +13,14 @@
#![feature(box_syntax)]
#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))]
#[cfg(target_pointer_width = "64")]
fn main() {
let n = 0us;
let a = box [&n; 0xF000000000000000us];
println!("{}", a[0xFFFFFFu]);
}
#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))]
#[cfg(target_pointer_width = "32")]
fn main() {
let n = 0us;
let a = box [&n; 0xFFFFFFFFu];

View File

@ -10,12 +10,12 @@
use std::mem::size_of;
#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))]
#[cfg(target_pointer_width = "32")]
pub fn main() {
assert_eq!(size_of::<[u8; (1 << 31) - 1]>(), (1 << 31) - 1);
}
#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))]
#[cfg(target_pointer_width = "64")]
pub fn main() {
assert_eq!(size_of::<[u8; (1 << 47) - 1]>(), (1 << 47) - 1);
}