Register new snapshots

Lots of cruft to remove!
This commit is contained in:
Alex Crichton 2015-12-11 13:07:11 -08:00
parent e2834a20e7
commit cd1848a1a6
60 changed files with 45 additions and 841 deletions

View File

@ -131,11 +131,7 @@ endif
ifdef CFG_ENABLE_DEBUGINFO
$(info cfg: enabling debuginfo (CFG_ENABLE_DEBUGINFO))
# FIXME: Re-enable -g in stage0 after new snapshot
#CFG_RUSTC_FLAGS += -g
RUSTFLAGS_STAGE1 += -g
RUSTFLAGS_STAGE2 += -g
RUSTFLAGS_STAGE3 += -g
CFG_RUSTC_FLAGS += -g
endif
ifdef SAVE_TEMPS

View File

@ -80,10 +80,8 @@ use core::mem::{align_of_val, size_of_val};
use core::intrinsics::abort;
use core::mem;
use core::ops::Deref;
#[cfg(not(stage0))]
use core::ops::CoerceUnsized;
use core::ptr::{self, Shared};
#[cfg(not(stage0))]
use core::marker::Unsize;
use core::hash::{Hash, Hasher};
use core::{usize, isize};
@ -135,8 +133,6 @@ unsafe impl<T: ?Sized + Sync + Send> Send for Arc<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> {}
// remove cfg after new snapshot
#[cfg(not(stage0))]
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
@ -157,8 +153,6 @@ unsafe impl<T: ?Sized + Sync + Send> Send for Weak<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> {}
// remove cfg after new snapshot
#[cfg(not(stage0))]
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}

View File

@ -56,11 +56,8 @@
//! The [`heap`](heap/index.html) module defines the low-level interface to the
//! default global allocator. It is not compatible with the libc allocator API.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "alloc"]
#![crate_type = "rlib"]
#![cfg_attr(stage0, staged_api)]
#![allow(unused_attributes)]
#![unstable(feature = "alloc",
reason = "this library is unlikely to be stabilized in its current \
@ -72,11 +69,8 @@
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
#![no_std]
#![cfg_attr(not(stage0), needs_allocator)]
#![needs_allocator]
#![cfg_attr(stage0, feature(rustc_attrs))]
#![cfg_attr(stage0, feature(no_std))]
#![cfg_attr(stage0, allow(unused_attributes))]
#![feature(allocator)]
#![feature(box_syntax)]
#![feature(coerce_unsized)]
@ -84,7 +78,6 @@
#![feature(custom_attribute)]
#![feature(fundamental)]
#![feature(lang_items)]
#![feature(nonzero)]
#![feature(num_bits_bytes)]
#![feature(optin_builtin_traits)]
#![feature(placement_in_syntax)]
@ -95,23 +88,15 @@
#![feature(unboxed_closures)]
#![feature(unique)]
#![feature(unsafe_no_drop_flag, filling_drop)]
// SNAP 1af31d4
#![allow(unused_features)]
// SNAP 1af31d4
#![allow(unused_attributes)]
#![feature(dropck_parametricity)]
#![feature(unsize)]
#![feature(drop_in_place)]
#![feature(fn_traits)]
#![cfg_attr(stage0, feature(alloc_system))]
#![cfg_attr(not(stage0), feature(needs_allocator))]
#![feature(needs_allocator)]
#![cfg_attr(test, feature(test, rustc_private, box_heap))]
#[cfg(stage0)]
extern crate alloc_system;
// Allow testing this library
#[cfg(test)]

View File

@ -162,11 +162,9 @@ use core::fmt;
use core::hash::{Hasher, Hash};
use core::intrinsics::{assume, abort};
use core::marker;
#[cfg(not(stage0))]
use core::marker::Unsize;
use core::mem::{self, align_of_val, size_of_val, forget};
use core::ops::Deref;
#[cfg(not(stage0))]
use core::ops::CoerceUnsized;
use core::ptr::{self, Shared};
use core::convert::From;
@ -196,8 +194,6 @@ impl<T: ?Sized> !marker::Send for Rc<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !marker::Sync for Rc<T> {}
// remove cfg after new snapshot
#[cfg(not(stage0))]
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {}
@ -723,8 +719,6 @@ impl<T: ?Sized> !marker::Send for Weak<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !marker::Sync for Weak<T> {}
// remove cfg after new snapshot
#[cfg(not(stage0))]
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}

View File

@ -8,13 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "alloc_jemalloc"]
#![crate_type = "rlib"]
#![cfg_attr(stage0, staged_api)]
#![no_std]
#![cfg_attr(not(stage0), allocator)]
#![cfg_attr(stage0, allow(improper_ctypes))]
#![allocator]
#![unstable(feature = "alloc_jemalloc",
reason = "this library is unlikely to be stabilized in its current \
form or name",
@ -22,7 +19,6 @@
#![feature(allocator)]
#![feature(libc)]
#![feature(staged_api)]
#![cfg_attr(stage0, feature(no_std))]
extern crate libc;

View File

@ -8,13 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "alloc_system"]
#![crate_type = "rlib"]
#![cfg_attr(stage0, staged_api)]
#![no_std]
#![cfg_attr(not(stage0), allocator)]
#![cfg_attr(stage0, allow(improper_ctypes))]
#![allocator]
#![unstable(feature = "alloc_system",
reason = "this library is unlikely to be stabilized in its current \
form or name",
@ -22,7 +19,6 @@
#![feature(allocator)]
#![feature(libc)]
#![feature(staged_api)]
#![cfg_attr(stage0, feature(no_std))]
extern crate libc;

View File

@ -19,11 +19,8 @@
//! arena but can only hold objects of a single type, and `Arena`, which is a
//! more complex, slower arena which can hold objects of any type.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "arena"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@ -42,11 +39,6 @@
#![feature(dropck_parametricity)]
#![cfg_attr(test, feature(test))]
// SNAP 1af31d4
#![allow(unused_features)]
// SNAP 1af31d4
#![allow(unused_attributes)]
extern crate alloc;
use std::cell::{Cell, RefCell};

View File

@ -13,10 +13,7 @@
//! See [std::collections](../std/collections) for a detailed discussion of
//! collections in Rust.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "collections"]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![unstable(feature = "collections",
reason = "library is unlikely to be stabilized with the current \
@ -32,17 +29,14 @@
#![allow(trivial_casts)]
#![cfg_attr(test, allow(deprecated))] // rand
// SNAP 1af31d4
#![allow(unused_features)]
// SNAP 1af31d4
#![allow(unused_attributes)]
#![cfg_attr(stage0, feature(rustc_attrs))]
#![cfg_attr(stage0, allow(unused_attributes))]
#![feature(alloc)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(clone_from_slice)]
#![feature(core_intrinsics)]
#![feature(decode_utf16)]
#![feature(drop_in_place)]
#![feature(dropck_parametricity)]
#![feature(fmt_internals)]
#![feature(fmt_radix)]
#![feature(heap_api)]
@ -53,7 +47,6 @@
#![feature(oom)]
#![feature(pattern)]
#![feature(ptr_as_ref)]
#![feature(ref_slice)]
#![feature(slice_bytes)]
#![feature(slice_patterns)]
#![feature(staged_api)]
@ -62,14 +55,9 @@
#![feature(unboxed_closures)]
#![feature(unicode)]
#![feature(unique)]
#![feature(dropck_parametricity)]
#![feature(unsafe_no_drop_flag, filling_drop)]
#![feature(decode_utf16)]
#![feature(drop_in_place)]
#![feature(clone_from_slice)]
#![cfg_attr(test, feature(clone_from_slice, rand, test))]
#![cfg_attr(stage0, feature(no_std))]
#![no_std]
extern crate rustc_unicode;

View File

@ -512,164 +512,32 @@ extern "rust-intrinsic" {
/// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
pub fn roundf64(x: f64) -> f64;
/// Returns the number of bits set in a `u8`.
#[cfg(stage0)]
pub fn ctpop8(x: u8) -> u8;
/// Returns the number of bits set in a `u16`.
#[cfg(stage0)]
pub fn ctpop16(x: u16) -> u16;
/// Returns the number of bits set in a `u32`.
#[cfg(stage0)]
pub fn ctpop32(x: u32) -> u32;
/// Returns the number of bits set in a `u64`.
#[cfg(stage0)]
pub fn ctpop64(x: u64) -> u64;
/// Returns the number of bits set in an integer type `T`
#[cfg(not(stage0))]
pub fn ctpop<T>(x: T) -> T;
/// Returns the number of leading bits unset in a `u8`.
#[cfg(stage0)]
pub fn ctlz8(x: u8) -> u8;
/// Returns the number of leading bits unset in a `u16`.
#[cfg(stage0)]
pub fn ctlz16(x: u16) -> u16;
/// Returns the number of leading bits unset in a `u32`.
#[cfg(stage0)]
pub fn ctlz32(x: u32) -> u32;
/// Returns the number of leading bits unset in a `u64`.
#[cfg(stage0)]
pub fn ctlz64(x: u64) -> u64;
/// Returns the number of leading bits unset in an integer type `T`
#[cfg(not(stage0))]
pub fn ctlz<T>(x: T) -> T;
/// Returns the number of trailing bits unset in a `u8`.
#[cfg(stage0)]
pub fn cttz8(x: u8) -> u8;
/// Returns the number of trailing bits unset in a `u16`.
#[cfg(stage0)]
pub fn cttz16(x: u16) -> u16;
/// Returns the number of trailing bits unset in a `u32`.
#[cfg(stage0)]
pub fn cttz32(x: u32) -> u32;
/// Returns the number of trailing bits unset in a `u64`.
#[cfg(stage0)]
pub fn cttz64(x: u64) -> u64;
/// Returns the number of trailing bits unset in an integer type `T`
#[cfg(not(stage0))]
pub fn cttz<T>(x: T) -> T;
/// Reverses the bytes in a `u16`.
#[cfg(stage0)]
pub fn bswap16(x: u16) -> u16;
/// Reverses the bytes in a `u32`.
#[cfg(stage0)]
pub fn bswap32(x: u32) -> u32;
/// Reverses the bytes in a `u64`.
#[cfg(stage0)]
pub fn bswap64(x: u64) -> u64;
/// Reverses the bytes in an integer type `T`.
#[cfg(not(stage0))]
pub fn bswap<T>(x: T) -> T;
/// Performs checked `i8` addition.
#[cfg(stage0)]
pub fn i8_add_with_overflow(x: i8, y: i8) -> (i8, bool);
/// Performs checked `i16` addition.
#[cfg(stage0)]
pub fn i16_add_with_overflow(x: i16, y: i16) -> (i16, bool);
/// Performs checked `i32` addition.
#[cfg(stage0)]
pub fn i32_add_with_overflow(x: i32, y: i32) -> (i32, bool);
/// Performs checked `i64` addition.
#[cfg(stage0)]
pub fn i64_add_with_overflow(x: i64, y: i64) -> (i64, bool);
/// Performs checked `u8` addition.
#[cfg(stage0)]
pub fn u8_add_with_overflow(x: u8, y: u8) -> (u8, bool);
/// Performs checked `u16` addition.
#[cfg(stage0)]
pub fn u16_add_with_overflow(x: u16, y: u16) -> (u16, bool);
/// Performs checked `u32` addition.
#[cfg(stage0)]
pub fn u32_add_with_overflow(x: u32, y: u32) -> (u32, bool);
/// Performs checked `u64` addition.
#[cfg(stage0)]
pub fn u64_add_with_overflow(x: u64, y: u64) -> (u64, bool);
/// Performs checked integer addition.
#[cfg(not(stage0))]
pub fn add_with_overflow<T>(x: T, y: T) -> (T, bool);
/// Performs checked `i8` subtraction.
#[cfg(stage0)]
pub fn i8_sub_with_overflow(x: i8, y: i8) -> (i8, bool);
/// Performs checked `i16` subtraction.
#[cfg(stage0)]
pub fn i16_sub_with_overflow(x: i16, y: i16) -> (i16, bool);
/// Performs checked `i32` subtraction.
#[cfg(stage0)]
pub fn i32_sub_with_overflow(x: i32, y: i32) -> (i32, bool);
/// Performs checked `i64` subtraction.
#[cfg(stage0)]
pub fn i64_sub_with_overflow(x: i64, y: i64) -> (i64, bool);
/// Performs checked `u8` subtraction.
#[cfg(stage0)]
pub fn u8_sub_with_overflow(x: u8, y: u8) -> (u8, bool);
/// Performs checked `u16` subtraction.
#[cfg(stage0)]
pub fn u16_sub_with_overflow(x: u16, y: u16) -> (u16, bool);
/// Performs checked `u32` subtraction.
#[cfg(stage0)]
pub fn u32_sub_with_overflow(x: u32, y: u32) -> (u32, bool);
/// Performs checked `u64` subtraction.
#[cfg(stage0)]
pub fn u64_sub_with_overflow(x: u64, y: u64) -> (u64, bool);
/// Performs checked integer subtraction
#[cfg(not(stage0))]
pub fn sub_with_overflow<T>(x: T, y: T) -> (T, bool);
/// Performs checked `i8` multiplication.
#[cfg(stage0)]
pub fn i8_mul_with_overflow(x: i8, y: i8) -> (i8, bool);
/// Performs checked `i16` multiplication.
#[cfg(stage0)]
pub fn i16_mul_with_overflow(x: i16, y: i16) -> (i16, bool);
/// Performs checked `i32` multiplication.
#[cfg(stage0)]
pub fn i32_mul_with_overflow(x: i32, y: i32) -> (i32, bool);
/// Performs checked `i64` multiplication.
#[cfg(stage0)]
pub fn i64_mul_with_overflow(x: i64, y: i64) -> (i64, bool);
/// Performs checked `u8` multiplication.
#[cfg(stage0)]
pub fn u8_mul_with_overflow(x: u8, y: u8) -> (u8, bool);
/// Performs checked `u16` multiplication.
#[cfg(stage0)]
pub fn u16_mul_with_overflow(x: u16, y: u16) -> (u16, bool);
/// Performs checked `u32` multiplication.
#[cfg(stage0)]
pub fn u32_mul_with_overflow(x: u32, y: u32) -> (u32, bool);
/// Performs checked `u64` multiplication.
#[cfg(stage0)]
pub fn u64_mul_with_overflow(x: u64, y: u64) -> (u64, bool);
/// Performs checked integer multiplication
#[cfg(not(stage0))]
pub fn mul_with_overflow<T>(x: T, y: T) -> (T, bool);
/// Performs an unchecked division, resulting in undefined behavior
/// where y = 0 or x = `T::min_value()` and y = -1
#[cfg(not(stage0))]
pub fn unchecked_div<T>(x: T, y: T) -> T;
/// Returns the remainder of an unchecked division, resulting in
/// undefined behavior where y = 0 or x = `T::min_value()` and y = -1
#[cfg(not(stage0))]
pub fn unchecked_rem<T>(x: T, y: T) -> T;
/// Returns (a + b) mod 2^N, where N is the width of T in bits.

View File

@ -43,11 +43,8 @@
// Since libcore defines many fundamental lang items, all tests live in a
// separate crate, libcoretest, to avoid bizarre issues.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "core"]
#![stable(feature = "core", since = "1.6.0")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
@ -60,8 +57,6 @@
#![no_core]
#![deny(missing_docs)]
#![cfg_attr(stage0, feature(rustc_attrs))]
#![cfg_attr(stage0, allow(unused_attributes))]
#![feature(allow_internal_unstable)]
#![feature(associated_type_defaults)]
#![feature(concat_idents)]
@ -75,8 +70,7 @@
#![feature(optin_builtin_traits)]
#![feature(reflect)]
#![feature(unwind_attributes)]
#![cfg_attr(stage0, feature(simd))]
#![cfg_attr(not(stage0), feature(repr_simd, platform_intrinsics))]
#![feature(repr_simd, platform_intrinsics)]
#![feature(staged_api)]
#![feature(unboxed_closures)]

View File

@ -38,31 +38,13 @@ unsafe impl Zeroable for u64 {}
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)]
pub struct NonZero<T: Zeroable>(T);
#[cfg(stage0)]
macro_rules! nonzero_new {
() => (
/// Creates an instance of NonZero with the provided value.
/// You must indeed ensure that the value is actually "non-zero".
#[inline(always)]
pub unsafe fn new(inner: T) -> NonZero<T> {
NonZero(inner)
}
)
}
#[cfg(not(stage0))]
macro_rules! nonzero_new {
() => (
impl<T: Zeroable> NonZero<T> {
/// Creates an instance of NonZero with the provided value.
/// You must indeed ensure that the value is actually "non-zero".
#[inline(always)]
pub const unsafe fn new(inner: T) -> NonZero<T> {
NonZero(inner)
}
)
}
impl<T: Zeroable> NonZero<T> {
nonzero_new!{}
}
impl<T: Zeroable> Deref for NonZero<T> {

View File

@ -55,15 +55,6 @@ macro_rules! impl_full_ops {
($($ty:ty: add($addfn:path), mul/div($bigty:ident);)*) => (
$(
impl FullOps for $ty {
#[cfg(stage0)]
fn full_add(self, other: $ty, carry: bool) -> (bool, $ty) {
// this cannot overflow, the output is between 0 and 2*2^nbits - 1
// FIXME will LLVM optimize this into ADC or similar???
let (v, carry1) = unsafe { $addfn(self, other) };
let (v, carry2) = unsafe { $addfn(v, if carry {1} else {0}) };
(carry1 || carry2, v)
}
#[cfg(not(stage0))]
fn full_add(self, other: $ty, carry: bool) -> (bool, $ty) {
// this cannot overflow, the output is between 0 and 2*2^nbits - 1
// FIXME will LLVM optimize this into ADC or similar???

View File

@ -115,11 +115,6 @@ macro_rules! zero_one_impl_float {
}
zero_one_impl_float! { f32 f64 }
// Just for stage0; a byte swap on a byte is a no-op
// Delete this once it becomes unused
#[cfg(stage0)]
unsafe fn bswap8(x: u8) -> u8 { x }
macro_rules! checked_op {
($U:ty, $op:path, $x:expr, $y:expr) => {{
let (result, overflowed) = unsafe { $op($x as $U, $y as $U) };
@ -785,15 +780,6 @@ macro_rules! int_impl {
}
#[lang = "i8"]
#[cfg(stage0)]
impl i8 {
int_impl! { i8, u8, 8,
intrinsics::i8_add_with_overflow,
intrinsics::i8_sub_with_overflow,
intrinsics::i8_mul_with_overflow }
}
#[lang = "i8"]
#[cfg(not(stage0))]
impl i8 {
int_impl! { i8, u8, 8,
intrinsics::add_with_overflow,
@ -802,15 +788,6 @@ impl i8 {
}
#[lang = "i16"]
#[cfg(stage0)]
impl i16 {
int_impl! { i16, u16, 16,
intrinsics::i16_add_with_overflow,
intrinsics::i16_sub_with_overflow,
intrinsics::i16_mul_with_overflow }
}
#[lang = "i16"]
#[cfg(not(stage0))]
impl i16 {
int_impl! { i16, u16, 16,
intrinsics::add_with_overflow,
@ -819,15 +796,6 @@ impl i16 {
}
#[lang = "i32"]
#[cfg(stage0)]
impl i32 {
int_impl! { i32, u32, 32,
intrinsics::i32_add_with_overflow,
intrinsics::i32_sub_with_overflow,
intrinsics::i32_mul_with_overflow }
}
#[lang = "i32"]
#[cfg(not(stage0))]
impl i32 {
int_impl! { i32, u32, 32,
intrinsics::add_with_overflow,
@ -836,15 +804,6 @@ impl i32 {
}
#[lang = "i64"]
#[cfg(stage0)]
impl i64 {
int_impl! { i64, u64, 64,
intrinsics::i64_add_with_overflow,
intrinsics::i64_sub_with_overflow,
intrinsics::i64_mul_with_overflow }
}
#[lang = "i64"]
#[cfg(not(stage0))]
impl i64 {
int_impl! { i64, u64, 64,
intrinsics::add_with_overflow,
@ -854,16 +813,6 @@ impl i64 {
#[cfg(target_pointer_width = "32")]
#[lang = "isize"]
#[cfg(stage0)]
impl isize {
int_impl! { i32, u32, 32,
intrinsics::i32_add_with_overflow,
intrinsics::i32_sub_with_overflow,
intrinsics::i32_mul_with_overflow }
}
#[cfg(target_pointer_width = "32")]
#[lang = "isize"]
#[cfg(not(stage0))]
impl isize {
int_impl! { i32, u32, 32,
intrinsics::add_with_overflow,
@ -873,16 +822,6 @@ impl isize {
#[cfg(target_pointer_width = "64")]
#[lang = "isize"]
#[cfg(stage0)]
impl isize {
int_impl! { i64, u64, 64,
intrinsics::i64_add_with_overflow,
intrinsics::i64_sub_with_overflow,
intrinsics::i64_mul_with_overflow }
}
#[cfg(target_pointer_width = "64")]
#[lang = "isize"]
#[cfg(not(stage0))]
impl isize {
int_impl! { i64, u64, 64,
intrinsics::add_with_overflow,
@ -980,25 +919,6 @@ macro_rules! uint_impl {
unsafe { $ctlz(self as $ActualT) as u32 }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
#[inline]
pub fn trailing_zeros(self) -> u32 {
// As of LLVM 3.6 the codegen for the zero-safe cttz8 intrinsic
// emits two conditional moves on x86_64. By promoting the value to
// u16 and setting bit 8, we get better code without any conditional
// operations.
// FIXME: There's a LLVM patch (http://reviews.llvm.org/D9284)
// pending, remove this workaround once LLVM generates better code
// for cttz8.
unsafe {
if $BITS == 8 {
intrinsics::cttz16(self as u16 | 0x100) as u32
} else {
$cttz(self as $ActualT) as u32
}
}
}
/// Returns the number of trailing zeros in the binary representation
/// of `self`.
///
@ -1012,7 +932,6 @@ macro_rules! uint_impl {
/// assert_eq!(n.trailing_zeros(), 3);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(not(stage0))]
#[inline]
pub fn trailing_zeros(self) -> u32 {
// As of LLVM 3.6 the codegen for the zero-safe cttz8 intrinsic
@ -1563,19 +1482,6 @@ macro_rules! uint_impl {
}
#[lang = "u8"]
#[cfg(stage0)]
impl u8 {
uint_impl! { u8, 8,
intrinsics::ctpop8,
intrinsics::ctlz8,
intrinsics::cttz8,
bswap8,
intrinsics::u8_add_with_overflow,
intrinsics::u8_sub_with_overflow,
intrinsics::u8_mul_with_overflow }
}
#[lang = "u8"]
#[cfg(not(stage0))]
impl u8 {
uint_impl! { u8, 8,
intrinsics::ctpop,
@ -1588,19 +1494,6 @@ impl u8 {
}
#[lang = "u16"]
#[cfg(stage0)]
impl u16 {
uint_impl! { u16, 16,
intrinsics::ctpop16,
intrinsics::ctlz16,
intrinsics::cttz16,
intrinsics::bswap16,
intrinsics::u16_add_with_overflow,
intrinsics::u16_sub_with_overflow,
intrinsics::u16_mul_with_overflow }
}
#[lang = "u16"]
#[cfg(not(stage0))]
impl u16 {
uint_impl! { u16, 16,
intrinsics::ctpop,
@ -1613,19 +1506,6 @@ impl u16 {
}
#[lang = "u32"]
#[cfg(stage0)]
impl u32 {
uint_impl! { u32, 32,
intrinsics::ctpop32,
intrinsics::ctlz32,
intrinsics::cttz32,
intrinsics::bswap32,
intrinsics::u32_add_with_overflow,
intrinsics::u32_sub_with_overflow,
intrinsics::u32_mul_with_overflow }
}
#[lang = "u32"]
#[cfg(not(stage0))]
impl u32 {
uint_impl! { u32, 32,
intrinsics::ctpop,
@ -1638,19 +1518,6 @@ impl u32 {
}
#[lang = "u64"]
#[cfg(stage0)]
impl u64 {
uint_impl! { u64, 64,
intrinsics::ctpop64,
intrinsics::ctlz64,
intrinsics::cttz64,
intrinsics::bswap64,
intrinsics::u64_add_with_overflow,
intrinsics::u64_sub_with_overflow,
intrinsics::u64_mul_with_overflow }
}
#[lang = "u64"]
#[cfg(not(stage0))]
impl u64 {
uint_impl! { u64, 64,
intrinsics::ctpop,
@ -1664,20 +1531,6 @@ impl u64 {
#[cfg(target_pointer_width = "32")]
#[lang = "usize"]
#[cfg(stage0)]
impl usize {
uint_impl! { u32, 32,
intrinsics::ctpop32,
intrinsics::ctlz32,
intrinsics::cttz32,
intrinsics::bswap32,
intrinsics::u32_add_with_overflow,
intrinsics::u32_sub_with_overflow,
intrinsics::u32_mul_with_overflow }
}
#[cfg(target_pointer_width = "32")]
#[lang = "usize"]
#[cfg(not(stage0))]
impl usize {
uint_impl! { u32, 32,
intrinsics::ctpop,
@ -1691,20 +1544,6 @@ impl usize {
#[cfg(target_pointer_width = "64")]
#[lang = "usize"]
#[cfg(stage0)]
impl usize {
uint_impl! { u64, 64,
intrinsics::ctpop64,
intrinsics::ctlz64,
intrinsics::cttz64,
intrinsics::bswap64,
intrinsics::u64_add_with_overflow,
intrinsics::u64_sub_with_overflow,
intrinsics::u64_mul_with_overflow }
}
#[cfg(target_pointer_width = "64")]
#[lang = "usize"]
#[cfg(not(stage0))]
impl usize {
uint_impl! { u64, 64,
intrinsics::ctpop,

View File

@ -12,30 +12,7 @@
#![unstable(feature = "wrapping", reason = "may be removed or relocated",
issue = "27755")]
#[cfg(stage0)]
pub use intrinsics::{
u8_add_with_overflow, i8_add_with_overflow,
u16_add_with_overflow, i16_add_with_overflow,
u32_add_with_overflow, i32_add_with_overflow,
u64_add_with_overflow, i64_add_with_overflow,
u8_sub_with_overflow, i8_sub_with_overflow,
u16_sub_with_overflow, i16_sub_with_overflow,
u32_sub_with_overflow, i32_sub_with_overflow,
u64_sub_with_overflow, i64_sub_with_overflow,
u8_mul_with_overflow, i8_mul_with_overflow,
u16_mul_with_overflow, i16_mul_with_overflow,
u32_mul_with_overflow, i32_mul_with_overflow,
u64_mul_with_overflow, i64_mul_with_overflow,
};
#[cfg(not(stage0))]
pub use intrinsics::{
add_with_overflow,
sub_with_overflow,
mul_with_overflow,
};
pub use intrinsics::{add_with_overflow, sub_with_overflow, mul_with_overflow};
use super::Wrapping;
@ -203,42 +180,18 @@ macro_rules! signed_overflowing_impl {
($($t:ident)*) => ($(
impl OverflowingOps for $t {
#[inline(always)]
#[cfg(stage0)]
fn overflowing_add(self, rhs: $t) -> ($t, bool) {
unsafe {
concat_idents!($t, _add_with_overflow)(self, rhs)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_add(self, rhs: $t) -> ($t, bool) {
unsafe {
add_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_sub(self, rhs: $t) -> ($t, bool) {
unsafe {
concat_idents!($t, _sub_with_overflow)(self, rhs)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_sub(self, rhs: $t) -> ($t, bool) {
unsafe {
sub_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_mul(self, rhs: $t) -> ($t, bool) {
unsafe {
concat_idents!($t, _mul_with_overflow)(self, rhs)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_mul(self, rhs: $t) -> ($t, bool) {
unsafe {
mul_with_overflow(self, rhs)
@ -289,42 +242,18 @@ macro_rules! unsigned_overflowing_impl {
($($t:ident)*) => ($(
impl OverflowingOps for $t {
#[inline(always)]
#[cfg(stage0)]
fn overflowing_add(self, rhs: $t) -> ($t, bool) {
unsafe {
concat_idents!($t, _add_with_overflow)(self, rhs)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_add(self, rhs: $t) -> ($t, bool) {
unsafe {
add_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_sub(self, rhs: $t) -> ($t, bool) {
unsafe {
concat_idents!($t, _sub_with_overflow)(self, rhs)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_sub(self, rhs: $t) -> ($t, bool) {
unsafe {
sub_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_mul(self, rhs: $t) -> ($t, bool) {
unsafe {
concat_idents!($t, _mul_with_overflow)(self, rhs)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_mul(self, rhs: $t) -> ($t, bool) {
unsafe {
mul_with_overflow(self, rhs)
@ -365,45 +294,18 @@ unsigned_overflowing_impl! { u8 u16 u32 u64 }
#[cfg(target_pointer_width = "64")]
impl OverflowingOps for usize {
#[inline(always)]
#[cfg(stage0)]
fn overflowing_add(self, rhs: usize) -> (usize, bool) {
unsafe {
let res = u64_add_with_overflow(self as u64, rhs as u64);
(res.0 as usize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_add(self, rhs: usize) -> (usize, bool) {
unsafe {
add_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_sub(self, rhs: usize) -> (usize, bool) {
unsafe {
let res = u64_sub_with_overflow(self as u64, rhs as u64);
(res.0 as usize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_sub(self, rhs: usize) -> (usize, bool) {
unsafe {
sub_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_mul(self, rhs: usize) -> (usize, bool) {
unsafe {
let res = u64_mul_with_overflow(self as u64, rhs as u64);
(res.0 as usize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_mul(self, rhs: usize) -> (usize, bool) {
unsafe {
mul_with_overflow(self, rhs)
@ -439,45 +341,18 @@ impl OverflowingOps for usize {
#[cfg(target_pointer_width = "32")]
impl OverflowingOps for usize {
#[inline(always)]
#[cfg(stage0)]
fn overflowing_add(self, rhs: usize) -> (usize, bool) {
unsafe {
let res = u32_add_with_overflow(self as u32, rhs as u32);
(res.0 as usize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_add(self, rhs: usize) -> (usize, bool) {
unsafe {
add_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_sub(self, rhs: usize) -> (usize, bool) {
unsafe {
let res = u32_sub_with_overflow(self as u32, rhs as u32);
(res.0 as usize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_sub(self, rhs: usize) -> (usize, bool) {
unsafe {
sub_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_mul(self, rhs: usize) -> (usize, bool) {
unsafe {
let res = u32_mul_with_overflow(self as u32, rhs as u32);
(res.0 as usize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_mul(self, rhs: usize) -> (usize, bool) {
unsafe {
mul_with_overflow(self, rhs)
@ -513,45 +388,18 @@ impl OverflowingOps for usize {
#[cfg(target_pointer_width = "64")]
impl OverflowingOps for isize {
#[inline(always)]
#[cfg(stage0)]
fn overflowing_add(self, rhs: isize) -> (isize, bool) {
unsafe {
let res = i64_add_with_overflow(self as i64, rhs as i64);
(res.0 as isize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_add(self, rhs: isize) -> (isize, bool) {
unsafe {
add_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_sub(self, rhs: isize) -> (isize, bool) {
unsafe {
let res = i64_sub_with_overflow(self as i64, rhs as i64);
(res.0 as isize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_sub(self, rhs: isize) -> (isize, bool) {
unsafe {
sub_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_mul(self, rhs: isize) -> (isize, bool) {
unsafe {
let res = i64_mul_with_overflow(self as i64, rhs as i64);
(res.0 as isize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_mul(self, rhs: isize) -> (isize, bool) {
unsafe {
mul_with_overflow(self, rhs)
@ -587,45 +435,18 @@ impl OverflowingOps for isize {
#[cfg(target_pointer_width = "32")]
impl OverflowingOps for isize {
#[inline(always)]
#[cfg(stage0)]
fn overflowing_add(self, rhs: isize) -> (isize, bool) {
unsafe {
let res = i32_add_with_overflow(self as i32, rhs as i32);
(res.0 as isize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_add(self, rhs: isize) -> (isize, bool) {
unsafe {
add_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_sub(self, rhs: isize) -> (isize, bool) {
unsafe {
let res = i32_sub_with_overflow(self as i32, rhs as i32);
(res.0 as isize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_sub(self, rhs: isize) -> (isize, bool) {
unsafe {
sub_with_overflow(self, rhs)
}
}
#[inline(always)]
#[cfg(stage0)]
fn overflowing_mul(self, rhs: isize) -> (isize, bool) {
unsafe {
let res = i32_mul_with_overflow(self as i32, rhs as i32);
(res.0 as isize, res.1)
}
}
#[inline(always)]
#[cfg(not(stage0))]
fn overflowing_mul(self, rhs: isize) -> (isize, bool) {
unsafe {
mul_with_overflow(self, rhs)

View File

@ -441,7 +441,6 @@ macro_rules! rem_impl_integer {
rem_impl_integer! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
#[cfg(not(stage0))]
macro_rules! rem_impl_float {
($($t:ty)*) => ($(
#[stable(feature = "rust1", since = "1.0.0")]
@ -456,48 +455,8 @@ macro_rules! rem_impl_float {
)*)
}
#[cfg(not(stage0))]
rem_impl_float! { f32 f64 }
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl Rem for f32 {
type Output = f32;
// The builtin f32 rem operator is broken when targeting
// MSVC; see comment in std::f32::floor.
// FIXME: See also #27859.
#[inline]
#[cfg(target_env = "msvc")]
fn rem(self, other: f32) -> f32 {
(self as f64).rem(other as f64) as f32
}
#[inline]
#[cfg(not(target_env = "msvc"))]
fn rem(self, other: f32) -> f32 {
extern { fn fmodf(a: f32, b: f32) -> f32; }
unsafe { fmodf(self, other) }
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl Rem for f64 {
type Output = f64;
#[inline]
fn rem(self, other: f64) -> f64 {
extern { fn fmod(a: f64, b: f64) -> f64; }
unsafe { fmod(self, other) }
}
}
#[cfg(stage0)]
forward_ref_binop! { impl Rem, rem for f64, f64 }
#[cfg(stage0)]
forward_ref_binop! { impl Rem, rem for f32, f32 }
/// The `Neg` trait is used to specify the functionality of unary `-`.
///
/// # Examples
@ -954,7 +913,6 @@ shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// foo += Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "add_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait AddAssign<Rhs=Self> {
@ -962,7 +920,6 @@ pub trait AddAssign<Rhs=Self> {
fn add_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! add_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -973,7 +930,6 @@ macro_rules! add_assign_impl {
)+)
}
#[cfg(not(stage0))]
add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `SubAssign` trait is used to specify the functionality of `-=`.
@ -1004,7 +960,6 @@ add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo -= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "sub_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait SubAssign<Rhs=Self> {
@ -1012,7 +967,6 @@ pub trait SubAssign<Rhs=Self> {
fn sub_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! sub_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1023,7 +977,6 @@ macro_rules! sub_assign_impl {
)+)
}
#[cfg(not(stage0))]
sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `MulAssign` trait is used to specify the functionality of `*=`.
@ -1054,7 +1007,6 @@ sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo *= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "mul_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait MulAssign<Rhs=Self> {
@ -1062,7 +1014,6 @@ pub trait MulAssign<Rhs=Self> {
fn mul_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! mul_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1073,7 +1024,6 @@ macro_rules! mul_assign_impl {
)+)
}
#[cfg(not(stage0))]
mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `DivAssign` trait is used to specify the functionality of `/=`.
@ -1104,7 +1054,6 @@ mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo /= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "div_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait DivAssign<Rhs=Self> {
@ -1112,7 +1061,6 @@ pub trait DivAssign<Rhs=Self> {
fn div_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! div_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1123,7 +1071,6 @@ macro_rules! div_assign_impl {
)+)
}
#[cfg(not(stage0))]
div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `RemAssign` trait is used to specify the functionality of `%=`.
@ -1154,7 +1101,6 @@ div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo %= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "rem_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait RemAssign<Rhs=Self> {
@ -1162,7 +1108,6 @@ pub trait RemAssign<Rhs=Self> {
fn rem_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! rem_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1173,7 +1118,6 @@ macro_rules! rem_assign_impl {
)+)
}
#[cfg(not(stage0))]
rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `BitAndAssign` trait is used to specify the functionality of `&=`.
@ -1204,7 +1148,6 @@ rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo &= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "bitand_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait BitAndAssign<Rhs=Self> {
@ -1212,7 +1155,6 @@ pub trait BitAndAssign<Rhs=Self> {
fn bitand_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! bitand_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1223,7 +1165,6 @@ macro_rules! bitand_assign_impl {
)+)
}
#[cfg(not(stage0))]
bitand_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// The `BitOrAssign` trait is used to specify the functionality of `|=`.
@ -1254,7 +1195,6 @@ bitand_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// foo |= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "bitor_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait BitOrAssign<Rhs=Self> {
@ -1262,7 +1202,6 @@ pub trait BitOrAssign<Rhs=Self> {
fn bitor_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! bitor_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1273,7 +1212,6 @@ macro_rules! bitor_assign_impl {
)+)
}
#[cfg(not(stage0))]
bitor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// The `BitXorAssign` trait is used to specify the functionality of `^=`.
@ -1304,7 +1242,6 @@ bitor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// foo ^= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "bitxor_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait BitXorAssign<Rhs=Self> {
@ -1312,7 +1249,6 @@ pub trait BitXorAssign<Rhs=Self> {
fn bitxor_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! bitxor_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1323,7 +1259,6 @@ macro_rules! bitxor_assign_impl {
)+)
}
#[cfg(not(stage0))]
bitxor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// The `ShlAssign` trait is used to specify the functionality of `<<=`.
@ -1354,7 +1289,6 @@ bitxor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// foo <<= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "shl_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait ShlAssign<Rhs> {
@ -1362,7 +1296,6 @@ pub trait ShlAssign<Rhs> {
fn shl_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! shl_assign_impl {
($t:ty, $f:ty) => (
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1375,7 +1308,6 @@ macro_rules! shl_assign_impl {
)
}
#[cfg(not(stage0))]
macro_rules! shl_assign_impl_all {
($($t:ty)*) => ($(
shl_assign_impl! { $t, u8 }
@ -1392,7 +1324,6 @@ macro_rules! shl_assign_impl_all {
)*)
}
#[cfg(not(stage0))]
shl_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// The `ShrAssign` trait is used to specify the functionality of `>>=`.
@ -1423,7 +1354,6 @@ shl_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// foo >>= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "shr_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait ShrAssign<Rhs=Self> {
@ -1431,7 +1361,6 @@ pub trait ShrAssign<Rhs=Self> {
fn shr_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! shr_assign_impl {
($t:ty, $f:ty) => (
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1444,7 +1373,6 @@ macro_rules! shr_assign_impl {
)
}
#[cfg(not(stage0))]
macro_rules! shr_assign_impl_all {
($($t:ty)*) => ($(
shr_assign_impl! { $t, u8 }
@ -1461,7 +1389,6 @@ macro_rules! shr_assign_impl_all {
)*)
}
#[cfg(not(stage0))]
shr_assign_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

@ -499,28 +499,12 @@ unsafe impl<T: Send + ?Sized> Send for Unique<T> { }
#[unstable(feature = "unique", issue = "27730")]
unsafe impl<T: Sync + ?Sized> Sync for Unique<T> { }
#[cfg(stage0)]
macro_rules! unique_new {
() => (
/// Creates a new `Unique`.
pub unsafe fn new(ptr: *mut T) -> Unique<T> {
Unique { pointer: NonZero::new(ptr), _marker: PhantomData }
}
)
}
#[cfg(not(stage0))]
macro_rules! unique_new {
() => (
#[unstable(feature = "unique", issue = "27730")]
impl<T: ?Sized> Unique<T> {
/// Creates a new `Unique`.
pub const unsafe fn new(ptr: *mut T) -> Unique<T> {
Unique { pointer: NonZero::new(ptr), _marker: PhantomData }
}
)
}
#[unstable(feature = "unique", issue = "27730")]
impl<T: ?Sized> Unique<T> {
unique_new!{}
/// Dereferences the content.
pub unsafe fn get(&self) -> &T {
@ -533,7 +517,6 @@ impl<T: ?Sized> Unique<T> {
}
}
#[cfg(not(stage0))] // remove cfg after new snapshot
#[unstable(feature = "unique", issue = "27730")]
impl<T: ?Sized, U: ?Sized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> { }
@ -598,7 +581,6 @@ impl<T: ?Sized> Clone for Shared<T> {
#[unstable(feature = "shared", issue = "27730")]
impl<T: ?Sized> Copy for Shared<T> { }
#[cfg(not(stage0))] // remove cfg after new snapshot
#[unstable(feature = "shared", issue = "27730")]
impl<T: ?Sized, U: ?Sized> CoerceUnsized<Shared<U>> for Shared<T> where T: Unsize<U> { }

View File

@ -14,11 +14,8 @@
//! [def]: https://en.wikipedia.org/wiki/DEFLATE
//! [mz]: https://code.google.com/p/miniz/
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "flate"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@ -30,7 +27,6 @@
#![feature(staged_api)]
#![feature(unique)]
#![cfg_attr(test, feature(rustc_private, rand, vec_push_all))]
#![cfg_attr(stage0, allow(improper_ctypes))]
#[cfg(test)]
#[macro_use]

View File

@ -14,11 +14,8 @@
//! Parsing does not happen at runtime: structures of `std::fmt::rt` are
//! generated instead.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "fmt_macros"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -77,14 +77,10 @@
//! }
//! ```
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "getopts"]
#![unstable(feature = "rustc_private",
reason = "use the crates.io `getopts` library instead",
issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -271,12 +271,9 @@
//!
//! * [DOT language](http://www.graphviz.org/doc/info/lang.html)
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "graphviz"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![feature(staged_api)]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -156,13 +156,10 @@
//! they're turned off (just a load and an integer comparison). This also means that
//! if logging is disabled, none of the components of the log will be executed.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "log"]
#![unstable(feature = "rustc_private",
reason = "use the crates.io `log` library instead",
issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -16,8 +16,6 @@
//! is not recommended to use this library directly, but rather the official
//! interface through `std::rand`.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rand"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
@ -26,7 +24,6 @@
html_playground_url = "https://play.rust-lang.org/",
test(attr(deny(warnings))))]
#![no_std]
#![cfg_attr(stage0, staged_api)]
#![unstable(feature = "rand",
reason = "use `rand` from crates.io",
issue = "27703")]
@ -37,7 +34,6 @@
#![feature(step_by)]
#![feature(custom_attribute)]
#![allow(unused_attributes)]
#![cfg_attr(stage0, feature(no_std))]
#![cfg_attr(test, feature(test, rand, rustc_private, iter_order_deprecated))]

View File

@ -111,11 +111,8 @@
//!
//! First 0x20 tags are reserved by RBML; custom tags start at 0x20.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rbml"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -14,11 +14,8 @@
//!
//! This API is completely unstable and subject to change.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -242,8 +242,6 @@ impl OverloadedCallType {
// mem_categorization, it requires a TYPER, which is a type that
// supplies types from the tree. After type checking is complete, you
// can just use the tcx as the typer.
//
// FIXME(stage0): the :'t here is probably only important for stage0
pub struct ExprUseVisitor<'d, 't, 'a: 't, 'tcx:'a+'d> {
typer: &'t infer::InferCtxt<'a, 'tcx>,
mc: mc::MemCategorizationContext<'t, 'a, 'tcx>,

View File

@ -90,7 +90,6 @@ fn get_resident() -> Option<usize> {
}
#[cfg(windows)]
#[cfg_attr(stage0, allow(improper_ctypes))]
fn get_resident() -> Option<usize> {
type BOOL = i32;
type DWORD = u32;

View File

@ -21,11 +21,8 @@
//! one that doesn't; the one that doesn't might get decent parallel
//! build speedups.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_back"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -9,14 +9,10 @@
// except according to those terms.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_bitflags"]
#![feature(associated_consts)]
#![feature(staged_api)]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![cfg_attr(stage0, feature(no_std))]
#![no_std]
#![unstable(feature = "rustc_private", issue = "27812")]

View File

@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_borrowck"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -16,13 +16,10 @@
//!
//! This API is completely unstable and subject to change.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_data_structures"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![cfg_attr(stage0, staged_api)]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]

View File

@ -14,11 +14,8 @@
//!
//! This API is completely unstable and subject to change.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_driver"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@ -32,7 +29,6 @@
#![feature(rustc_private)]
#![feature(set_stdio)]
#![feature(staged_api)]
#![feature(raw)] // remove after snapshot
extern crate arena;
extern crate flate;
@ -105,24 +101,6 @@ pub mod target_features;
const BUG_REPORT_URL: &'static str = "https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.\
md#bug-reports";
// SNAP 1af31d4
// This is a terrible hack. Our stage0 is older than 1.4 and does not
// support DST coercions, so this function performs the corecion
// manually. This should go away.
pub fn cstore_to_cratestore(a: Rc<CStore>) -> Rc<for<'s> CrateStore<'s>>
{
use std::mem;
use std::raw::TraitObject;
unsafe {
let TraitObject { vtable, .. } =
mem::transmute::<&for<'s> CrateStore<'s>, TraitObject>(&*a);
mem::transmute(TraitObject {
data: mem::transmute(a),
vtable: vtable
})
}
}
pub fn run(args: Vec<String>) -> isize {
monitor(move || run_compiler(&args, &mut RustcDefaultCalls));
0
@ -159,8 +137,8 @@ pub fn run_compiler<'a>(args: &[String], callbacks: &mut CompilerCalls<'a>) {
};
let cstore = Rc::new(CStore::new(token::get_ident_interner()));
let cstore_ = cstore_to_cratestore(cstore.clone());
let mut sess = build_session(sopts, input_file_path, descriptions, cstore_);
let mut sess = build_session(sopts, input_file_path, descriptions,
cstore.clone());
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
if sess.unstable_options() {
sess.opts.show_span = matches.opt_str("show-span");
@ -356,8 +334,8 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
return None;
}
let cstore = Rc::new(CStore::new(token::get_ident_interner()));
let cstore_ = cstore_to_cratestore(cstore.clone());
let sess = build_session(sopts.clone(), None, descriptions.clone(), cstore_);
let sess = build_session(sopts.clone(), None, descriptions.clone(),
cstore.clone());
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
let should_stop = RustcDefaultCalls::print_crate_info(&sess, None, odir, ofile);
if should_stop == Compilation::Stop {

View File

@ -14,11 +14,8 @@
//!
//! This API is completely unstable and subject to change.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_front"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -19,11 +19,8 @@
//!
//! This API is completely unstable and subject to change.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_lint"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -8,19 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(trivial_casts)]
#![cfg_attr(stage0, allow(improper_ctypes))]
#![crate_name = "rustc_llvm"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -8,10 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_metadata"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -8,10 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_platform_intrinsics"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![feature(staged_api, rustc_private)]

View File

@ -50,10 +50,8 @@
//! See the [Plugins Chapter](../../book/compiler-plugins.html) of the book
//! for more examples.
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_plugin"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_privacy"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_resolve"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -14,11 +14,8 @@
//!
//! This API is completely unstable and subject to change.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_trans"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -62,11 +62,9 @@ independently:
This API is completely unstable and subject to change.
*/
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_typeck"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -20,11 +20,8 @@
//! provide for basic string-related manipulations. This crate does not
//! (yet) aim to provide a full set of Unicode tables.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustc_unicode"]
#![unstable(feature = "unicode", issue = "27783")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
@ -34,9 +31,6 @@
test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
#![no_std]
#![cfg_attr(stage0, feature(rustc_attrs))]
#![cfg_attr(stage0, feature(no_std))]
#![cfg_attr(stage0, allow(unused_attributes))]
#![feature(core_char_ext)]
#![feature(lang_items)]
#![feature(staged_api)]

View File

@ -125,8 +125,8 @@ pub fn run_core(search_paths: SearchPaths, cfgs: Vec<String>, externs: Externs,
codemap.clone());
let cstore = Rc::new(CStore::new(token::get_ident_interner()));
let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
let sess = session::build_session_(sessopts, cpath, diagnostic_handler, codemap, cstore_);
let sess = session::build_session_(sessopts, cpath, diagnostic_handler,
codemap, cstore.clone());
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
let mut cfg = config::build_configuration(&sess);

View File

@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "rustdoc"]
#![unstable(feature = "rustdoc", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -80,12 +80,11 @@ pub fn run(input: &str,
codemap.clone());
let cstore = Rc::new(CStore::new(token::get_ident_interner()));
let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
let sess = session::build_session_(sessopts,
Some(input_path.clone()),
diagnostic_handler,
codemap,
cstore_);
cstore.clone());
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
let mut cfg = config::build_configuration(&sess);
@ -235,12 +234,11 @@ fn runtest(test: &str, cratename: &str, cfgs: Vec<String>, libs: SearchPaths,
let diagnostic_handler = errors::Handler::with_emitter(true, false, box emitter);
let cstore = Rc::new(CStore::new(token::get_ident_interner()));
let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
let sess = session::build_session_(sessopts,
None,
diagnostic_handler,
codemap,
cstore_);
cstore.clone());
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
let outdir = TempDir::new("rustdoctest").ok().expect("rustdoc needs a tempdir");

View File

@ -14,13 +14,10 @@
Core encoding and decoding interfaces.
*/
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "serialize"]
#![unstable(feature = "rustc_private",
reason = "deprecated in favor of rustc-serialize on crates.io",
issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -199,11 +199,8 @@
//! [other]: #what-is-in-the-standard-library-documentation
//! [primitive types]: ../book/primitive-types.html
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "std"]
#![stable(feature = "rust1", since = "1.0.0")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@ -214,12 +211,6 @@
test(no_crate_inject, attr(deny(warnings))),
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
#![cfg_attr(stage0, allow(unused_attributes))]
#![cfg_attr(stage0, allow(improper_ctypes))]
#![cfg_attr(stage0, feature(rustc_attrs))]
#![cfg_attr(stage0, feature(no_std))]
#![cfg_attr(stage0, allow(unused_attributes))]
#![feature(alloc)]
#![feature(allow_internal_unstable)]
#![feature(asm)]

View File

@ -238,8 +238,6 @@ mod imp {
#[cfg(target_os = "ios")]
mod imp {
#[cfg(stage0)] use prelude::v1::*;
use io;
use mem;
use ptr;

View File

@ -131,8 +131,6 @@ extern "C" {
pub fn _Unwind_DeleteException(exception: *mut _Unwind_Exception);
// remove cfg after new snapshot
#[cfg(not(all(stage0, target_os="windows", target_arch="x86_64")))]
#[unwind]
pub fn _Unwind_Resume(exception: *mut _Unwind_Exception) -> !;
}

View File

@ -88,18 +88,8 @@ use sys_common::mutex::Mutex;
#[path = "seh.rs"] #[doc(hidden)]
pub mod imp;
// stage0: i686-pc-windows-gnu
#[cfg(all(stage0, windows, target_arch = "x86_64", target_env = "gnu"))]
#[path = "seh64_gnu.rs"] #[doc(hidden)]
pub mod imp;
// stage0: x86_64-pc-windows-msvc
#[cfg(all(stage0, windows, target_arch = "x86_64", target_env = "msvc"))]
#[path = "seh.rs"] #[doc(hidden)]
pub mod imp;
// x86_64-pc-windows-*
#[cfg(all(not(stage0), windows, target_arch = "x86_64"))]
#[cfg(all(windows, target_arch = "x86_64"))]
#[path = "seh64_gnu.rs"] #[doc(hidden)]
pub mod imp;

View File

@ -17,7 +17,7 @@ use os::raw::{c_char, c_short, c_ulonglong};
use libc::{wchar_t, size_t, c_void};
use ptr;
#[cfg_attr(not(stage0), repr(simd))]
#[repr(simd)]
#[repr(C)]
struct u64x2(u64, u64);

View File

@ -14,11 +14,8 @@
//!
//! This API is completely unstable and subject to change.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "syntax"]
#![unstable(feature = "rustc_private", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@ -26,8 +23,6 @@
html_root_url = "https://doc.rust-lang.org/nightly/",
test(attr(deny(warnings))))]
#![cfg_attr(stage0, feature(rustc_attrs))]
#![cfg_attr(stage0, allow(unused_attributes))]
#![feature(associated_consts)]
#![feature(filling_drop)]
#![feature(libc)]

View File

@ -17,8 +17,6 @@
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![cfg_attr(stage0, feature(custom_attribute))]
#![cfg_attr(stage0, staged_api)]
#![unstable(feature = "rustc_private", issue = "27812")]
#![feature(rustc_private)]

View File

@ -40,13 +40,10 @@
//! [win]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682010%28v=vs.85%29.aspx
//! [ti]: https://en.wikipedia.org/wiki/Terminfo
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "term"]
#![unstable(feature = "rustc_private",
reason = "use the crates.io `term` library instead",
issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -23,11 +23,8 @@
// running tests while providing a base that other test frameworks may
// build off of.
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
#![cfg_attr(stage0, feature(custom_attribute))]
#![crate_name = "test"]
#![unstable(feature = "test", issue = "27812")]
#![cfg_attr(stage0, staged_api)]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -22,8 +22,6 @@
// object (usually called `crtX.o), which then invokes initialization callbacks
// of other runtime components (registered via yet another special image section).
#![cfg_attr(stage0, feature(no_std))]
#![crate_type="rlib"]
#![no_std]
#![allow(non_camel_case_types)]

View File

@ -10,8 +10,6 @@
// See rsbegin.rs for details.
#![cfg_attr(stage0, feature(no_std))]
#![crate_type="rlib"]
#![no_std]

View File

@ -1,3 +1,11 @@
S 2015-12-18 3391630
linux-i386 a09c4a4036151d0cb28e265101669731600e01f2
linux-x86_64 97e2a5eb8904962df8596e95d6e5d9b574d73bf4
macos-i386 ca52d2d3ba6497ed007705ee3401cf7efc136ca1
macos-x86_64 3c44ffa18f89567c2b81f8d695e711c86d81ffc7
winnt-i386 f9056ebd3db9611d31c2dc6dc5f96c7208d5d227
winnt-x86_64 a85a40e535d828016181d3aa40afe34c3e36ab8c
S 2015-08-11 1af31d4
bitrig-x86_64 739e0635cd5a1b3635f1457aae3ef6390ea9a7a8
freebsd-i386 3cd4a44fb97b3135be3d1b760bea604a381e85dc

View File

@ -215,9 +215,8 @@ fn compile_program(input: &str, sysroot: PathBuf)
let handle = thread.spawn(move || {
let opts = build_exec_options(sysroot);
let cstore = Rc::new(CStore::new(token::get_ident_interner()));
let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
let sess = build_session(opts, None, Registry::new(&rustc::DIAGNOSTICS),
cstore_);
cstore.clone());
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
let cfg = build_configuration(&sess);

View File

@ -55,8 +55,7 @@ fn basic_sess(sysroot: PathBuf) -> (Session, Rc<CStore>) {
let descriptions = Registry::new(&rustc::DIAGNOSTICS);
let cstore = Rc::new(CStore::new(token::get_ident_interner()));
let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
let sess = build_session(opts, None, descriptions, cstore_);
let sess = build_session(opts, None, descriptions, cstore.clone());
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
(sess, cstore)
}