use config::Config;
// The version number
-pub const CFG_RELEASE_NUM: &str = "1.30.0";
+pub const CFG_RELEASE_NUM: &str = "1.31.0";
pub struct GitInfo {
inner: Option<Info>,
#![cfg_attr(not(test), feature(fn_traits))]
#![cfg_attr(not(test), feature(generator_trait))]
-#![cfg_attr(not(stage0), feature(nll))]
#![cfg_attr(test, feature(test))]
#![feature(allocator_api)]
#![feature(box_syntax)]
#![feature(cfg_target_has_atomic)]
#![feature(coerce_unsized)]
-#![cfg_attr(stage0, feature(const_fn))]
-#![cfg_attr(not(stage0), feature(min_const_fn))]
+#![feature(min_const_fn)]
#![feature(core_intrinsics)]
#![feature(custom_attribute)]
#![feature(dropck_eyepatch)]
#![feature(lang_items)]
#![feature(libc)]
#![feature(needs_allocator)]
+#![feature(nll)]
#![feature(optin_builtin_traits)]
#![feature(pattern)]
#![feature(pin)]
#![feature(allocator_api)]
#![feature(alloc_system)]
#![feature(box_syntax)]
-#![cfg_attr(stage0, feature(const_fn))]
-#![cfg_attr(not(stage0), feature(min_const_fn))]
+#![feature(min_const_fn)]
#![feature(drain_filter)]
#![feature(exact_size_is_empty)]
#![feature(pattern)]
#![feature(core_intrinsics)]
#![feature(libc)]
#![feature(linkage)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(staged_api)]
#![feature(rustc_attrs)]
#![cfg_attr(dummy_jemalloc, allow(dead_code, unused_extern_crates))]
// ABI
#[rustc_std_internal_symbol]
- #[cfg_attr(stage0, no_mangle)]
pub unsafe extern fn __rde_alloc(size: usize, align: usize) -> *mut u8 {
let flags = align_to_flags(align, size);
let ptr = mallocx(size as size_t, flags) as *mut u8;
}
#[rustc_std_internal_symbol]
- #[cfg_attr(stage0, no_mangle)]
pub unsafe extern fn __rde_dealloc(ptr: *mut u8,
size: usize,
align: usize) {
}
#[rustc_std_internal_symbol]
- #[cfg_attr(stage0, no_mangle)]
pub unsafe extern fn __rde_realloc(ptr: *mut u8,
_old_size: usize,
align: usize,
}
#[rustc_std_internal_symbol]
- #[cfg_attr(stage0, no_mangle)]
pub unsafe extern fn __rde_alloc_zeroed(size: usize, align: usize) -> *mut u8 {
let ptr = if align <= MIN_ALIGN && align <= size {
calloc(size as size_t, 1) as *mut u8
#![feature(allocator_api)]
#![feature(core_intrinsics)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(staged_api)]
#![feature(rustc_attrs)]
#![cfg_attr(any(unix, target_os = "cloudabi", target_os = "redox"), feature(libc))]
#![feature(alloc)]
#![feature(core_intrinsics)]
#![feature(dropck_eyepatch)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(raw_vec_internals)]
#![cfg_attr(test, feature(test))]
#![feature(lang_items)]
#![feature(link_llvm_intrinsics)]
#![feature(never_type)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(exhaustive_patterns)]
#![feature(macro_at_most_once_rep)]
#![feature(no_core)]
/// [alignment]: ./fn.align_of.html
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(not(stage0))]
pub const fn size_of<T>() -> usize {
intrinsics::size_of::<T>()
}
-#[inline]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(stage0)]
-/// Ceci n'est pas la documentation
-pub const fn size_of<T>() -> usize {
- unsafe { intrinsics::size_of::<T>() }
-}
-
/// Returns the size of the pointed-to value in bytes.
///
/// This is usually the same as `size_of::<T>()`. However, when `T` *has* no
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")]
-#[cfg(not(stage0))]
pub fn min_align_of<T>() -> usize {
intrinsics::min_align_of::<T>()
}
-#[inline]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")]
-#[cfg(stage0)]
-/// Ceci n'est pas la documentation
-pub fn min_align_of<T>() -> usize {
- unsafe { intrinsics::min_align_of::<T>() }
-}
-
/// Returns the [ABI]-required minimum alignment of the type of the value that `val` points to.
///
/// Every reference to a value of the type `T` must be a multiple of this number.
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(not(stage0))]
pub const fn align_of<T>() -> usize {
intrinsics::min_align_of::<T>()
}
-#[inline]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(stage0)]
-/// Ceci n'est pas la documentation
-pub const fn align_of<T>() -> usize {
- unsafe { intrinsics::min_align_of::<T>() }
-}
-
/// Returns the [ABI]-required minimum alignment of the type of the value that `val` points to.
///
/// Every reference to a value of the type `T` must be a multiple of this number.
/// A wrapper type for raw pointers and integers that will never be
/// NULL or 0 that might allow certain optimizations.
-#[cfg_attr(stage0, lang = "non_zero")]
-#[cfg_attr(not(stage0), rustc_layout_scalar_valid_range_start(1))]
+#[rustc_layout_scalar_valid_range_start(1)]
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(transparent)]
pub(crate) struct NonZero<T>(pub(crate) T);
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn rotate_left(self, n: u32) -> Self {
- (self as $UnsignedT).rotate_left(n) as Self
- }
-
doc_comment! {
concat!("Shifts the bits to the left by a specified amount, `n`,
wrapping the truncated bits to the end of the resulting integer.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_rotate")]
#[inline]
- #[cfg(not(stage0))]
pub const fn rotate_left(self, n: u32) -> Self {
(self as $UnsignedT).rotate_left(n) as Self
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn rotate_right(self, n: u32) -> Self {
- (self as $UnsignedT).rotate_right(n) as Self
- }
-
doc_comment! {
concat!("Shifts the bits to the right by a specified amount, `n`,
wrapping the truncated bits to the beginning of the resulting
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_rotate")]
#[inline]
- #[cfg(not(stage0))]
pub const fn rotate_right(self, n: u32) -> Self {
(self as $UnsignedT).rotate_right(n) as Self
}
}
}
- /// no docs here
- #[unstable(feature = "reverse_bits", issue = "48763")]
- #[inline]
- #[cfg(stage0)]
- pub fn reverse_bits(self) -> Self {
- (self as $UnsignedT).reverse_bits() as Self
- }
-
doc_comment! {
concat!("Reverses the bit pattern of the integer.
#[unstable(feature = "reverse_bits", issue = "48763")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn reverse_bits(self) -> Self {
(self as $UnsignedT).reverse_bits() as Self
}
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_add(self, rhs: Self) -> Self {
- unsafe {
- intrinsics::overflowing_add(self, rhs)
- }
- }
-
doc_comment! {
concat!("Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the
boundary of the type.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_add(self, rhs: Self) -> Self {
unsafe {
intrinsics::overflowing_add(self, rhs)
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_sub(self, rhs: Self) -> Self {
- unsafe {
- intrinsics::overflowing_sub(self, rhs)
- }
- }
-
doc_comment! {
concat!("Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the
boundary of the type.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_sub(self, rhs: Self) -> Self {
unsafe {
intrinsics::overflowing_sub(self, rhs)
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_mul(self, rhs: Self) -> Self {
- unsafe {
- intrinsics::overflowing_mul(self, rhs)
- }
- }
-
doc_comment! {
concat!("Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at
the boundary of the type.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_mul(self, rhs: Self) -> Self {
unsafe {
intrinsics::overflowing_mul(self, rhs)
}
}
- /// no docs here
- #[stable(feature = "num_wrapping", since = "1.2.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_shl(self, rhs: u32) -> Self {
- unsafe {
- intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
- }
- }
-
doc_comment! {
concat!("Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes
any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.
#[stable(feature = "num_wrapping", since = "1.2.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_shl(self, rhs: u32) -> Self {
unsafe {
intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
}
}
- /// no docs here
- #[stable(feature = "num_wrapping", since = "1.2.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_shr(self, rhs: u32) -> Self {
- unsafe {
- intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
- }
- }
-
doc_comment! {
concat!("Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`
removes any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.
#[stable(feature = "num_wrapping", since = "1.2.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_shr(self, rhs: u32) -> Self {
unsafe {
intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_add(self, rhs: Self) -> (Self, bool) {
- let (a, b) = unsafe {
- intrinsics::add_with_overflow(self as $ActualT,
- rhs as $ActualT)
- };
- (a as Self, b)
- }
-
doc_comment! {
concat!("Calculates `self` + `rhs`
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) {
let (a, b) = unsafe {
intrinsics::add_with_overflow(self as $ActualT,
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
- let (a, b) = unsafe {
- intrinsics::sub_with_overflow(self as $ActualT,
- rhs as $ActualT)
- };
- (a as Self, b)
- }
-
doc_comment! {
concat!("Calculates `self` - `rhs`
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
let (a, b) = unsafe {
intrinsics::sub_with_overflow(self as $ActualT,
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_mul(self, rhs: Self) -> (Self, bool) {
- let (a, b) = unsafe {
- intrinsics::mul_with_overflow(self as $ActualT,
- rhs as $ActualT)
- };
- (a as Self, b)
- }
-
doc_comment! {
concat!("Calculates the multiplication of `self` and `rhs`.
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) {
let (a, b) = unsafe {
intrinsics::mul_with_overflow(self as $ActualT,
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
- (self.wrapping_shl(rhs), (rhs > ($BITS - 1)))
- }
-
doc_comment! {
concat!("Shifts self left by `rhs` bits.
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
(self.wrapping_shl(rhs), (rhs > ($BITS - 1)))
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
- (self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
- }
-
doc_comment! {
concat!("Shifts self right by `rhs` bits.
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
(self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
}
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn is_positive(self) -> bool { self > 0 }
-
doc_comment! {
concat!("Returns `true` if `self` is positive and `false` if the number is zero or
negative.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_sign")]
#[inline]
- #[cfg(not(stage0))]
pub const fn is_positive(self) -> bool { self > 0 }
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn is_negative(self) -> bool { self < 0 }
-
doc_comment! {
concat!("Returns `true` if `self` is negative and `false` if the number is zero or
positive.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_sign")]
#[inline]
- #[cfg(not(stage0))]
pub const fn is_negative(self) -> bool { self < 0 }
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
- self.to_be().to_ne_bytes()
- }
-
doc_comment! {
concat!("Return the memory representation of this integer as a byte array in
big-endian (network) byte order.
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
self.to_be().to_ne_bytes()
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
- self.to_le().to_ne_bytes()
- }
-
doc_comment! {
concat!("Return the memory representation of this integer as a byte array in
little-endian byte order.
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
self.to_le().to_ne_bytes()
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
- unsafe { mem::transmute(self) }
- }
-
doc_comment! {
concat!("
Return the memory representation of this integer as a byte array in
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
unsafe { mem::transmute(self) }
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
- Self::from_be(Self::from_ne_bytes(bytes))
- }
-
doc_comment! {
concat!("Create an integer value from its representation as a byte array in
big endian.
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
Self::from_be(Self::from_ne_bytes(bytes))
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
- Self::from_le(Self::from_ne_bytes(bytes))
- }
-
doc_comment! {
concat!("
Create an integer value from its representation as a byte array in
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
Self::from_le(Self::from_ne_bytes(bytes))
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
- unsafe { mem::transmute(bytes) }
- }
-
doc_comment! {
concat!("Create an integer value from its memory representation as a byte
array in native endianness.
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
unsafe { mem::transmute(bytes) }
}
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn rotate_left(self, n: u32) -> Self {
- // Protect against undefined behaviour for over-long bit shifts
- let n = n % $BITS;
- (self << n) | (self >> (($BITS - n) % $BITS))
- }
-
doc_comment! {
concat!("Shifts the bits to the left by a specified amount, `n`,
wrapping the truncated bits to the end of the resulting integer.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_rotate")]
#[inline]
- #[cfg(not(stage0))]
pub const fn rotate_left(self, n: u32) -> Self {
(self << (n % $BITS)) | (self >> (($BITS - (n % $BITS)) % $BITS))
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn rotate_right(self, n: u32) -> Self {
- // Protect against undefined behaviour for over-long bit shifts
- let n = n % $BITS;
- (self >> n) | (self << (($BITS - n) % $BITS))
- }
-
doc_comment! {
concat!("Shifts the bits to the right by a specified amount, `n`,
wrapping the truncated bits to the beginning of the resulting
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_rotate")]
#[inline]
- #[cfg(not(stage0))]
pub const fn rotate_right(self, n: u32) -> Self {
(self >> (n % $BITS)) | (self << (($BITS - (n % $BITS)) % $BITS))
}
}
}
- /// no docs here
- #[unstable(feature = "reverse_bits", issue = "48763")]
- #[inline]
- #[cfg(stage0)]
- pub fn reverse_bits(self) -> Self {
- unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
- }
-
doc_comment! {
concat!("Reverses the bit pattern of the integer.
#[unstable(feature = "reverse_bits", issue = "48763")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn reverse_bits(self) -> Self {
unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
}
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_add(self, rhs: Self) -> Self {
- unsafe {
- intrinsics::overflowing_add(self, rhs)
- }
- }
-
doc_comment! {
concat!("Wrapping (modular) addition. Computes `self + rhs`,
wrapping around at the boundary of the type.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_add(self, rhs: Self) -> Self {
unsafe {
intrinsics::overflowing_add(self, rhs)
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_sub(self, rhs: Self) -> Self {
- unsafe {
- intrinsics::overflowing_sub(self, rhs)
- }
- }
-
doc_comment! {
concat!("Wrapping (modular) subtraction. Computes `self - rhs`,
wrapping around at the boundary of the type.
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_sub(self, rhs: Self) -> Self {
unsafe {
intrinsics::overflowing_sub(self, rhs)
}
}
- /// no docs here
- #[stable(feature = "rust1", since = "1.0.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_mul(self, rhs: Self) -> Self {
- unsafe {
- intrinsics::overflowing_mul(self, rhs)
- }
- }
-
/// Wrapping (modular) multiplication. Computes `self *
/// rhs`, wrapping around at the boundary of the type.
///
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_mul(self, rhs: Self) -> Self {
unsafe {
intrinsics::overflowing_mul(self, rhs)
self.overflowing_neg().0
}
- /// no docs here
- #[stable(feature = "num_wrapping", since = "1.2.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_shl(self, rhs: u32) -> Self {
- unsafe {
- intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
- }
- }
-
doc_comment! {
concat!("Panic-free bitwise shift-left; yields `self << mask(rhs)`,
where `mask` removes any high-order bits of `rhs` that
#[stable(feature = "num_wrapping", since = "1.2.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_shl(self, rhs: u32) -> Self {
unsafe {
intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
}
}
- /// no docs here
- #[stable(feature = "num_wrapping", since = "1.2.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn wrapping_shr(self, rhs: u32) -> Self {
- unsafe {
- intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
- }
- }
-
doc_comment! {
concat!("Panic-free bitwise shift-right; yields `self >> mask(rhs)`,
where `mask` removes any high-order bits of `rhs` that
#[stable(feature = "num_wrapping", since = "1.2.0")]
#[rustc_const_unstable(feature = "const_int_wrapping")]
#[inline]
- #[cfg(not(stage0))]
pub const fn wrapping_shr(self, rhs: u32) -> Self {
unsafe {
intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_add(self, rhs: Self) -> (Self, bool) {
- let (a, b) = unsafe {
- intrinsics::add_with_overflow(self as $ActualT,
- rhs as $ActualT)
- };
- (a as Self, b)
- }
-
doc_comment! {
concat!("Calculates `self` + `rhs`
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) {
let (a, b) = unsafe {
intrinsics::add_with_overflow(self as $ActualT,
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
- let (a, b) = unsafe {
- intrinsics::sub_with_overflow(self as $ActualT,
- rhs as $ActualT)
- };
- (a as Self, b)
- }
-
doc_comment! {
concat!("Calculates `self` - `rhs`
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
let (a, b) = unsafe {
intrinsics::sub_with_overflow(self as $ActualT,
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_mul(self, rhs: Self) -> (Self, bool) {
- let (a, b) = unsafe {
- intrinsics::mul_with_overflow(self as $ActualT,
- rhs as $ActualT)
- };
- (a as Self, b)
- }
-
/// Calculates the multiplication of `self` and `rhs`.
///
/// Returns a tuple of the multiplication along with a boolean
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) {
let (a, b) = unsafe {
intrinsics::mul_with_overflow(self as $ActualT,
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
- (self.wrapping_shl(rhs), (rhs > ($BITS - 1)))
- }
-
doc_comment! {
concat!("Shifts self left by `rhs` bits.
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
(self.wrapping_shl(rhs), (rhs > ($BITS - 1)))
}
}
- /// no docs here
- #[stable(feature = "wrapping", since = "1.7.0")]
- #[inline]
- #[cfg(stage0)]
- pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
- (self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
- }
-
doc_comment! {
concat!("Shifts self right by `rhs` bits.
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_int_overflowing")]
#[inline]
- #[cfg(not(stage0))]
pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
(self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
}
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
- self.to_be().to_ne_bytes()
- }
-
- doc_comment! {
+ doc_comment! {
concat!("Return the memory representation of this integer as a byte array in
big-endian (network) byte order.
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
self.to_be().to_ne_bytes()
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
- self.to_le().to_ne_bytes()
- }
-
doc_comment! {
concat!("Return the memory representation of this integer as a byte array in
little-endian byte order.
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
self.to_le().to_ne_bytes()
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
- unsafe { mem::transmute(self) }
- }
-
doc_comment! {
concat!("
Return the memory representation of this integer as a byte array in
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
unsafe { mem::transmute(self) }
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
- Self::from_be(Self::from_ne_bytes(bytes))
- }
-
doc_comment! {
concat!("Create an integer value from its representation as a byte array in
big endian.
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
Self::from_be(Self::from_ne_bytes(bytes))
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
- Self::from_le(Self::from_ne_bytes(bytes))
- }
-
doc_comment! {
concat!("
Create an integer value from its representation as a byte array in
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
Self::from_le(Self::from_ne_bytes(bytes))
}
}
- /// no docs here
- #[unstable(feature = "int_to_from_bytes", issue = "52963")]
- #[inline]
- #[cfg(stage0)]
- pub fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
- unsafe { mem::transmute(bytes) }
- }
-
doc_comment! {
concat!("Create an integer value from its memory representation as a byte
array in native endianness.
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
#[rustc_const_unstable(feature = "const_int_conversion")]
#[inline]
- #[cfg(not(stage0))]
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
unsafe { mem::transmute(bytes) }
}
html_playground_url = "https://play.rust-lang.org/",
test(attr(deny(warnings))))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
pub use self::Piece::*;
pub use self::Position::*;
html_root_url = "https://doc.rust-lang.org/nightly/",
test(attr(allow(unused_variables), deny(warnings))))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(str_escape)]
use self::LabelText::*;
#![feature(core_intrinsics)]
#![feature(libc)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(panic_runtime)]
#![feature(staged_api)]
#![feature(rustc_attrs)]
// Rust's "try" function, but if we're aborting on panics we just call the
// function as there's nothing else we need to do here.
-#[cfg_attr(stage0, no_mangle)]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8),
data: *mut u8,
// which would break compat with XP. For now just use `intrinsics::abort` which
// will kill us with an illegal instruction, which will do a good enough job for
// now hopefully.
-#[cfg_attr(stage0, no_mangle)]
#[rustc_std_internal_symbol]
pub unsafe extern fn __rust_start_panic(_payload: usize) -> u32 {
abort();
#![feature(core_intrinsics)]
#![feature(lang_items)]
#![feature(libc)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(panic_unwind)]
#![feature(raw)]
#![feature(staged_api)]
test(no_crate_inject, attr(deny(warnings))),
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(lang_items)]
reason = "internal implementation detail of rustc right now",
issue = "0")]
#![allow(unused_features)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(staged_api)]
#![feature(box_patterns)]
#![feature(box_syntax)]
-#![cfg_attr(stage0, feature(const_fn))]
-#![cfg_attr(not(stage0), feature(min_const_fn))]
+#![feature(min_const_fn)]
#![feature(core_intrinsics)]
#![feature(drain_filter)]
#![cfg_attr(windows, feature(libc))]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(never_type)]
#![feature(exhaustive_patterns)]
#![feature(extern_types)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(non_exhaustive)]
#![feature(proc_macro_internals)]
#![feature(quote)]
#![feature(refcell_replace_swap)]
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_attrs)]
-#![cfg_attr(stage0, feature(attr_literals))]
#![feature(slice_patterns)]
#![feature(slice_sort_by_cached_key)]
#![feature(specialization)]
#![feature(step_trait)]
#![feature(integer_atomics)]
#![feature(test)]
-#![cfg_attr(not(stage0), feature(impl_header_lifetime_elision))]
+#![feature(impl_header_lifetime_elision)]
#![feature(in_band_lifetimes)]
#![feature(macro_at_most_once_rep)]
-#![cfg_attr(stage0, feature(crate_in_paths))]
#![feature(crate_visibility_modifier)]
#![recursion_limit="512"]
// compilation error if size of `ScopeData` is not the same as a `u32`
#[allow(dead_code)]
-// only works on stage 1 when the rustc_layout_scalar_valid_range attribute actually exists
-#[cfg(not(stage0))]
static ASSERT: () = [()][!(mem::size_of::<ScopeData>() == 4) as usize];
impl Scope {
impl<'tcx> CommonTypes<'tcx> {
fn new(interners: &CtxtInterners<'tcx>) -> CommonTypes<'tcx> {
// Ensure our type representation does not grow
- #[cfg(all(not(stage0), target_pointer_width = "64"))]
+ #[cfg(target_pointer_width = "64")]
#[allow(dead_code)]
static ASSERT_TY_KIND: () = [()][!(::std::mem::size_of::<ty::TyKind>() <= 24) as usize];
- #[cfg(all(not(stage0), target_pointer_width = "64"))]
+ #[cfg(target_pointer_width = "64")]
#[allow(dead_code)]
static ASSERT_TYS: () = [()][!(::std::mem::size_of::<ty::TyS>() <= 32) as usize];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(rustc_private)]
#[macro_use] extern crate log;
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![forbid(unsafe_code)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(try_from)]
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
#[allow(unused_extern_crates)]
#![sanitizer_runtime]
#![feature(alloc_system)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(sanitizer_runtime)]
#![feature(staged_api)]
#![no_std]
#![allow(non_camel_case_types)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(quote)]
#![recursion_limit="256"]
#![feature(in_band_lifetimes)]
#![allow(unused_attributes)]
#![feature(libc)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(quote)]
#![feature(range_contains)]
#![feature(rustc_diagnostic_macros)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(custom_attribute)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![allow(unused_attributes)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
// See Cargo.toml for a comment explaining this crate.
#![allow(unused_extern_crates)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
extern crate bitflags;
extern crate log;
#![feature(unsize)]
#![feature(specialization)]
#![feature(optin_builtin_traits)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(allow_internal_unstable)]
#![feature(vec_resize_with)]
#![feature(box_syntax)]
#![cfg_attr(unix, feature(libc))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(option_replace)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![allow(unused_attributes)]
#![feature(range_contains)]
#![cfg_attr(unix, feature(libc))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(optin_builtin_traits)]
extern crate atty;
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(specialization)]
#![recursion_limit="256"]
#![cfg_attr(test, feature(test))]
#![feature(box_patterns)]
#![feature(box_syntax)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(macro_at_most_once_rep)]
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(static_nobundle)]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
#![sanitizer_runtime]
#![feature(alloc_system)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(sanitizer_runtime)]
#![feature(staged_api)]
#![no_std]
#![feature(box_patterns)]
#![feature(libc)]
#![feature(macro_at_most_once_rep)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(proc_macro_internals)]
#![feature(proc_macro_quote)]
#![feature(quote)]
#![feature(core_intrinsics)]
#![feature(const_fn)]
#![feature(decl_macro)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(exhaustive_patterns)]
#![feature(range_contains)]
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_attrs)]
-#![cfg_attr(stage0, feature(attr_literals))]
#![feature(never_type)]
#![feature(specialization)]
#![feature(try_trait)]
#![sanitizer_runtime]
#![feature(alloc_system)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(sanitizer_runtime)]
#![feature(staged_api)]
#![no_std]
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(rustc_diagnostic_macros)]
#[macro_use]
#![allow(nonstandard_style)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
pub struct Intrinsic {
pub inputs: &'static [&'static Type],
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(rustc_diagnostic_macros)]
#[macro_use] extern crate syntax;
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(rustc_diagnostic_macros)]
#![recursion_limit="256"]
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![feature(crate_visibility_modifier)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(rustc_diagnostic_macros)]
#![feature(slice_sort_by_cached_key)]
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![feature(custom_attribute)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![allow(unused_attributes)]
#![recursion_limit="256"]
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![feature(box_syntax)]
-#![cfg_attr(stage0, feature(const_fn))]
-#![cfg_attr(not(stage0), feature(min_const_fn))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(min_const_fn)]
+#![feature(nll)]
#![feature(slice_patterns)]
#[macro_use]
//! New recursive solver modeled on Chalk's recursive solver. Most of
//! the guts are broken up into modules; see the comments in those modules.
-#![cfg_attr(stage0, feature(crate_in_paths))]
#![feature(crate_visibility_modifier)]
-#![cfg_attr(stage0, feature(extern_prelude))]
#![feature(in_band_lifetimes)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![recursion_limit="256"]
#![sanitizer_runtime]
#![feature(alloc_system)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(sanitizer_runtime)]
#![feature(staged_api)]
#![no_std]
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
#![feature(exhaustive_patterns)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(quote)]
#![feature(refcell_replace_swap)]
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
#![feature(box_patterns)]
#![feature(box_syntax)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(set_stdio)]
#![feature(slice_sort_by_cached_key)]
#![feature(test)]
#![feature(core_intrinsics)]
#![feature(specialization)]
#![feature(never_type)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![cfg_attr(test, feature(test))]
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable};
// ABI
#[rustc_std_internal_symbol]
- #[cfg_attr(stage0, no_mangle)]
pub unsafe extern fn __rdl_alloc(size: usize, align: usize) -> *mut u8 {
let layout = Layout::from_size_align_unchecked(size, align);
System.alloc(layout)
}
#[rustc_std_internal_symbol]
- #[cfg_attr(stage0, no_mangle)]
pub unsafe extern fn __rdl_dealloc(ptr: *mut u8,
size: usize,
align: usize) {
}
#[rustc_std_internal_symbol]
- #[cfg_attr(stage0, no_mangle)]
pub unsafe extern fn __rdl_realloc(ptr: *mut u8,
old_size: usize,
align: usize,
}
#[rustc_std_internal_symbol]
- #[cfg_attr(stage0, no_mangle)]
pub unsafe extern fn __rdl_alloc_zeroed(size: usize, align: usize) -> *mut u8 {
let layout = Layout::from_size_align_unchecked(size, align);
System.alloc_zeroed(layout)
#![feature(cfg_target_vendor)]
#![feature(char_error_internals)]
#![feature(compiler_builtins_lib)]
-#![cfg_attr(stage0, feature(const_fn))]
-#![cfg_attr(not(stage0), feature(min_const_fn))]
+#![feature(min_const_fn)]
#![feature(const_int_ops)]
#![feature(const_ip)]
#![feature(core_intrinsics)]
#![feature(libc)]
#![feature(link_args)]
#![feature(linkage)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(needs_panic_runtime)]
#![feature(never_type)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(exhaustive_patterns)]
#![feature(on_unimplemented)]
#![feature(optin_builtin_traits)]
#![feature(rustc_attrs)]
#![feature(rustc_const_unstable)]
#![feature(std_internals)]
-#![feature(stdsimd)]
+#![cfg_attr(not(stage0), feature(stdsimd))]
#![feature(shrink_to)]
#![feature(slice_concat_ext)]
#![feature(slice_internals)]
#![feature(unboxed_closures)]
#![feature(untagged_unions)]
#![feature(unwind_attributes)]
-#![cfg_attr(stage0, feature(use_extern_macros))]
#![feature(doc_cfg)]
#![feature(doc_masked)]
#![feature(doc_spotlight)]
-#![cfg_attr(all(windows, stage0), feature(used))]
#![feature(doc_alias)]
#![feature(doc_keyword)]
#![feature(panic_info_message)]
-#![cfg_attr(stage0, feature(panic_implementation))]
#![feature(non_exhaustive)]
#![default_lib_allocator]
/// Entry point of panic from the libcore crate.
#[cfg(not(test))]
-#[cfg_attr(stage0, panic_implementation)]
-#[cfg_attr(not(stage0), panic_handler)]
+#[panic_handler]
#[unwind(allowed)]
pub fn rust_begin_panic(info: &PanicInfo) -> ! {
continue_panic_fmt(&info)
#[unstable(feature = "libstd_sys_internals",
reason = "used by the panic! macro",
issue = "0")]
-#[cfg_attr(not(any(stage0, test)), lang = "begin_panic")]
+#[cfg_attr(not(test), lang = "begin_panic")]
#[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible
pub fn begin_panic<M: Any + Send>(msg: M, file_line_col: &(&'static str, u32, u32)) -> ! {
// Note that this should be the only allocation performed in this code path.
#![feature(crate_visibility_modifier)]
#![feature(macro_at_most_once_rep)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(rustc_attrs)]
#![feature(rustc_diagnostic_macros)]
#![feature(slice_sort_by_cached_key)]
#![feature(proc_macro_internals)]
#![feature(decl_macro)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(str_escape)]
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(const_fn)]
#![feature(crate_visibility_modifier)]
#![feature(custom_attribute)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(non_exhaustive)]
#![feature(optin_builtin_traits)]
#![feature(specialization)]
-#![feature(stdsimd)]
+#![cfg_attr(not(stage0), feature(stdsimd))]
use std::borrow::Cow;
use std::cell::Cell;
#![cfg_attr(windows, feature(libc))]
// Handle rustfmt skips
#![feature(custom_attribute)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![allow(unused_attributes)]
use std::io::prelude::*;
#![feature(asm)]
#![feature(fnbox)]
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(set_stdio)]
#![feature(panic_unwind)]
#![feature(staged_api)]
#![feature(cfg_target_vendor)]
#![feature(link_cfg)]
-#![cfg_attr(not(stage0), feature(nll))]
+#![feature(nll)]
#![feature(staged_api)]
#![feature(unwind_attributes)]
#![feature(static_nobundle)]
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
# `0.x.0` for Cargo where they were released on `date`.
-date: 2018-09-11
+date: 2018-09-23
rustc: beta
cargo: beta
#![feature(plugin_registrar, rustc_private)]
#![feature(box_syntax)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(macro_at_most_once_rep)]
#[macro_use] extern crate rustc;
#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(macro_at_most_once_rep)]
// Load rustc as a plugin to get macros
#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(macro_at_most_once_rep)]
extern crate syntax;
#![feature(plugin_registrar, rustc_private)]
#![feature(box_syntax)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(macro_at_most_once_rep)]
#[macro_use] extern crate rustc;
// except according to those terms.
#![feature(box_syntax, plugin, plugin_registrar, rustc_private)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(macro_at_most_once_rep)]
#![crate_type = "dylib"]
// except according to those terms.
// run-pass
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
//{{{ issue 40569 ==============================================================
// run-pass
#![allow(dead_code, unused_imports)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(crate_visibility_modifier)]
/**
#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(macro_at_most_once_rep)]
// Load rustc as a plugin to get macros
#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(macro_at_most_once_rep)]
extern crate syntax;
#![feature(plugin_registrar)]
#![feature(box_syntax, rustc_private)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![feature(macro_at_most_once_rep)]
extern crate syntax;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
macro_rules! foo {
($($p:vis)*) => {} //~ ERROR repetition matches empty token tree
error: repetition matches empty token tree
- --> $DIR/issue-42755.rs:14:7
+ --> $DIR/issue-42755.rs:13:7
|
LL | ($($p:vis)*) => {} //~ ERROR repetition matches empty token tree
| ^^^^^^^^
// compile-pass
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![allow(unused)]
#![warn(unreachable_pub)]
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:26:5
+ --> $DIR/unreachable_pub-pub_crate.rs:25:5
|
LL | pub use std::fmt;
| ---^^^^^^^^^^^^^^
| help: consider restricting its visibility: `pub(crate)`
|
note: lint level defined here
- --> $DIR/unreachable_pub-pub_crate.rs:22:9
+ --> $DIR/unreachable_pub-pub_crate.rs:21:9
|
LL | #![warn(unreachable_pub)]
| ^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:27:24
+ --> $DIR/unreachable_pub-pub_crate.rs:26:24
|
LL | pub use std::env::{Args}; // braced-use has different item spans than unbraced
| --- ^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:29:5
+ --> $DIR/unreachable_pub-pub_crate.rs:28:5
|
LL | pub struct Hydrogen {
| ---^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` field
- --> $DIR/unreachable_pub-pub_crate.rs:31:9
+ --> $DIR/unreachable_pub-pub_crate.rs:30:9
|
LL | pub neutrons: usize,
| ---^^^^^^^^^^^^^^^^
| help: consider restricting its visibility: `pub(crate)`
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:37:9
+ --> $DIR/unreachable_pub-pub_crate.rs:36:9
|
LL | pub fn count_neutrons(&self) -> usize { self.neutrons }
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| help: consider restricting its visibility: `pub(crate)`
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:41:5
+ --> $DIR/unreachable_pub-pub_crate.rs:40:5
|
LL | pub enum Helium {}
| ---^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:42:5
+ --> $DIR/unreachable_pub-pub_crate.rs:41:5
|
LL | pub union Lithium { c1: usize, c2: u8 }
| ---^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:43:5
+ --> $DIR/unreachable_pub-pub_crate.rs:42:5
|
LL | pub fn beryllium() {}
| ---^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:44:5
+ --> $DIR/unreachable_pub-pub_crate.rs:43:5
|
LL | pub trait Boron {}
| ---^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:45:5
+ --> $DIR/unreachable_pub-pub_crate.rs:44:5
|
LL | pub const CARBON: usize = 1;
| ---^^^^^^^^^^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:46:5
+ --> $DIR/unreachable_pub-pub_crate.rs:45:5
|
LL | pub static NITROGEN: usize = 2;
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:47:5
+ --> $DIR/unreachable_pub-pub_crate.rs:46:5
|
LL | pub type Oxygen = bool;
| ---^^^^^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:50:47
+ --> $DIR/unreachable_pub-pub_crate.rs:49:47
|
LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub-pub_crate.rs:55:9
+ --> $DIR/unreachable_pub-pub_crate.rs:54:9
|
LL | pub fn catalyze() -> bool;
| ---^^^^^^^^^^^^^^^^^^^^^^^
// compile-pass
#![feature(crate_visibility_modifier)]
-#![cfg_attr(stage0, feature(macro_vis_matcher))]
#![allow(unused)]
#![warn(unreachable_pub)]
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:21:5
+ --> $DIR/unreachable_pub.rs:20:5
|
LL | pub use std::fmt;
| ---^^^^^^^^^^^^^^
| help: consider restricting its visibility: `crate`
|
note: lint level defined here
- --> $DIR/unreachable_pub.rs:17:9
+ --> $DIR/unreachable_pub.rs:16:9
|
LL | #![warn(unreachable_pub)]
| ^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:22:24
+ --> $DIR/unreachable_pub.rs:21:24
|
LL | pub use std::env::{Args}; // braced-use has different item spans than unbraced
| --- ^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:24:5
+ --> $DIR/unreachable_pub.rs:23:5
|
LL | pub struct Hydrogen {
| ---^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` field
- --> $DIR/unreachable_pub.rs:26:9
+ --> $DIR/unreachable_pub.rs:25:9
|
LL | pub neutrons: usize,
| ---^^^^^^^^^^^^^^^^
| help: consider restricting its visibility: `crate`
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:32:9
+ --> $DIR/unreachable_pub.rs:31:9
|
LL | pub fn count_neutrons(&self) -> usize { self.neutrons }
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| help: consider restricting its visibility: `crate`
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:36:5
+ --> $DIR/unreachable_pub.rs:35:5
|
LL | pub enum Helium {}
| ---^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:37:5
+ --> $DIR/unreachable_pub.rs:36:5
|
LL | pub union Lithium { c1: usize, c2: u8 }
| ---^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:38:5
+ --> $DIR/unreachable_pub.rs:37:5
|
LL | pub fn beryllium() {}
| ---^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:39:5
+ --> $DIR/unreachable_pub.rs:38:5
|
LL | pub trait Boron {}
| ---^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:40:5
+ --> $DIR/unreachable_pub.rs:39:5
|
LL | pub const CARBON: usize = 1;
| ---^^^^^^^^^^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:41:5
+ --> $DIR/unreachable_pub.rs:40:5
|
LL | pub static NITROGEN: usize = 2;
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:42:5
+ --> $DIR/unreachable_pub.rs:41:5
|
LL | pub type Oxygen = bool;
| ---^^^^^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:45:47
+ --> $DIR/unreachable_pub.rs:44:47
|
LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^
= help: or consider exporting it for use by other crates
warning: unreachable `pub` item
- --> $DIR/unreachable_pub.rs:50:9
+ --> $DIR/unreachable_pub.rs:49:9
|
LL | pub fn catalyze() -> bool;
| ---^^^^^^^^^^^^^^^^^^^^^^^