Bump to 1.31.0 and bootstrap from 1.30 beta
This commit is contained in:
parent
7d52cbce6d
commit
ce034951fb
71 changed files with 63 additions and 540 deletions
|
@ -24,7 +24,7 @@ use Build;
|
||||||
use config::Config;
|
use config::Config;
|
||||||
|
|
||||||
// The version number
|
// The version number
|
||||||
pub const CFG_RELEASE_NUM: &str = "1.30.0";
|
pub const CFG_RELEASE_NUM: &str = "1.31.0";
|
||||||
|
|
||||||
pub struct GitInfo {
|
pub struct GitInfo {
|
||||||
inner: Option<Info>,
|
inner: Option<Info>,
|
||||||
|
|
|
@ -76,7 +76,6 @@
|
||||||
|
|
||||||
#![cfg_attr(not(test), feature(fn_traits))]
|
#![cfg_attr(not(test), feature(fn_traits))]
|
||||||
#![cfg_attr(not(test), feature(generator_trait))]
|
#![cfg_attr(not(test), feature(generator_trait))]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
|
||||||
#![cfg_attr(test, feature(test))]
|
#![cfg_attr(test, feature(test))]
|
||||||
|
|
||||||
#![feature(allocator_api)]
|
#![feature(allocator_api)]
|
||||||
|
@ -87,8 +86,7 @@
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(cfg_target_has_atomic)]
|
#![feature(cfg_target_has_atomic)]
|
||||||
#![feature(coerce_unsized)]
|
#![feature(coerce_unsized)]
|
||||||
#![cfg_attr(stage0, feature(const_fn))]
|
#![feature(min_const_fn)]
|
||||||
#![cfg_attr(not(stage0), feature(min_const_fn))]
|
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(custom_attribute)]
|
#![feature(custom_attribute)]
|
||||||
#![feature(dropck_eyepatch)]
|
#![feature(dropck_eyepatch)]
|
||||||
|
@ -99,6 +97,7 @@
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![feature(needs_allocator)]
|
#![feature(needs_allocator)]
|
||||||
|
#![feature(nll)]
|
||||||
#![feature(optin_builtin_traits)]
|
#![feature(optin_builtin_traits)]
|
||||||
#![feature(pattern)]
|
#![feature(pattern)]
|
||||||
#![feature(pin)]
|
#![feature(pin)]
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
#![feature(allocator_api)]
|
#![feature(allocator_api)]
|
||||||
#![feature(alloc_system)]
|
#![feature(alloc_system)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![cfg_attr(stage0, feature(const_fn))]
|
#![feature(min_const_fn)]
|
||||||
#![cfg_attr(not(stage0), feature(min_const_fn))]
|
|
||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
#![feature(exact_size_is_empty)]
|
#![feature(exact_size_is_empty)]
|
||||||
#![feature(pattern)]
|
#![feature(pattern)]
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![feature(linkage)]
|
#![feature(linkage)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![cfg_attr(dummy_jemalloc, allow(dead_code, unused_extern_crates))]
|
#![cfg_attr(dummy_jemalloc, allow(dead_code, unused_extern_crates))]
|
||||||
|
@ -90,7 +90,6 @@ mod contents {
|
||||||
// ABI
|
// ABI
|
||||||
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
pub unsafe extern fn __rde_alloc(size: usize, align: usize) -> *mut u8 {
|
pub unsafe extern fn __rde_alloc(size: usize, align: usize) -> *mut u8 {
|
||||||
let flags = align_to_flags(align, size);
|
let flags = align_to_flags(align, size);
|
||||||
let ptr = mallocx(size as size_t, flags) as *mut u8;
|
let ptr = mallocx(size as size_t, flags) as *mut u8;
|
||||||
|
@ -98,7 +97,6 @@ mod contents {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
pub unsafe extern fn __rde_dealloc(ptr: *mut u8,
|
pub unsafe extern fn __rde_dealloc(ptr: *mut u8,
|
||||||
size: usize,
|
size: usize,
|
||||||
align: usize) {
|
align: usize) {
|
||||||
|
@ -107,7 +105,6 @@ mod contents {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
pub unsafe extern fn __rde_realloc(ptr: *mut u8,
|
pub unsafe extern fn __rde_realloc(ptr: *mut u8,
|
||||||
_old_size: usize,
|
_old_size: usize,
|
||||||
align: usize,
|
align: usize,
|
||||||
|
@ -118,7 +115,6 @@ mod contents {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
pub unsafe extern fn __rde_alloc_zeroed(size: usize, align: usize) -> *mut u8 {
|
pub unsafe extern fn __rde_alloc_zeroed(size: usize, align: usize) -> *mut u8 {
|
||||||
let ptr = if align <= MIN_ALIGN && align <= size {
|
let ptr = if align <= MIN_ALIGN && align <= size {
|
||||||
calloc(size as size_t, 1) as *mut u8
|
calloc(size as size_t, 1) as *mut u8
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#![feature(allocator_api)]
|
#![feature(allocator_api)]
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![cfg_attr(any(unix, target_os = "cloudabi", target_os = "redox"), feature(libc))]
|
#![cfg_attr(any(unix, target_os = "cloudabi", target_os = "redox"), feature(libc))]
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#![feature(alloc)]
|
#![feature(alloc)]
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(dropck_eyepatch)]
|
#![feature(dropck_eyepatch)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(raw_vec_internals)]
|
#![feature(raw_vec_internals)]
|
||||||
#![cfg_attr(test, feature(test))]
|
#![cfg_attr(test, feature(test))]
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![feature(link_llvm_intrinsics)]
|
#![feature(link_llvm_intrinsics)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
#![feature(no_core)]
|
#![feature(no_core)]
|
||||||
|
|
|
@ -285,19 +285,10 @@ pub fn forget<T>(t: T) {
|
||||||
/// [alignment]: ./fn.align_of.html
|
/// [alignment]: ./fn.align_of.html
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn size_of<T>() -> usize {
|
pub const fn size_of<T>() -> usize {
|
||||||
intrinsics::size_of::<T>()
|
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.
|
/// Returns the size of the pointed-to value in bytes.
|
||||||
///
|
///
|
||||||
/// This is usually the same as `size_of::<T>()`. However, when `T` *has* no
|
/// This is usually the same as `size_of::<T>()`. However, when `T` *has* no
|
||||||
|
@ -343,20 +334,10 @@ pub fn size_of_val<T: ?Sized>(val: &T) -> usize {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")]
|
#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub fn min_align_of<T>() -> usize {
|
pub fn min_align_of<T>() -> usize {
|
||||||
intrinsics::min_align_of::<T>()
|
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.
|
/// 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.
|
/// Every reference to a value of the type `T` must be a multiple of this number.
|
||||||
|
@ -395,19 +376,10 @@ pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn align_of<T>() -> usize {
|
pub const fn align_of<T>() -> usize {
|
||||||
intrinsics::min_align_of::<T>()
|
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.
|
/// 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.
|
/// Every reference to a value of the type `T` must be a multiple of this number.
|
||||||
|
|
|
@ -14,8 +14,7 @@ use ops::CoerceUnsized;
|
||||||
|
|
||||||
/// A wrapper type for raw pointers and integers that will never be
|
/// A wrapper type for raw pointers and integers that will never be
|
||||||
/// NULL or 0 that might allow certain optimizations.
|
/// NULL or 0 that might allow certain optimizations.
|
||||||
#[cfg_attr(stage0, lang = "non_zero")]
|
#[rustc_layout_scalar_valid_range_start(1)]
|
||||||
#[cfg_attr(not(stage0), rustc_layout_scalar_valid_range_start(1))]
|
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
pub(crate) struct NonZero<T>(pub(crate) T);
|
pub(crate) struct NonZero<T>(pub(crate) T);
|
||||||
|
|
|
@ -341,14 +341,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Shifts the bits to the left by a specified amount, `n`,
|
concat!("Shifts the bits to the left by a specified amount, `n`,
|
||||||
wrapping the truncated bits to the end of the resulting integer.
|
wrapping the truncated bits to the end of the resulting integer.
|
||||||
|
@ -368,20 +360,11 @@ assert_eq!(n.rotate_left(", $rot, "), m);
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_rotate")]
|
#[rustc_const_unstable(feature = "const_int_rotate")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn rotate_left(self, n: u32) -> Self {
|
pub const fn rotate_left(self, n: u32) -> Self {
|
||||||
(self as $UnsignedT).rotate_left(n) as 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! {
|
doc_comment! {
|
||||||
concat!("Shifts the bits to the right by a specified amount, `n`,
|
concat!("Shifts the bits to the right by a specified amount, `n`,
|
||||||
wrapping the truncated bits to the beginning of the resulting
|
wrapping the truncated bits to the beginning of the resulting
|
||||||
|
@ -402,7 +385,6 @@ assert_eq!(n.rotate_right(", $rot, "), m);
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_rotate")]
|
#[rustc_const_unstable(feature = "const_int_rotate")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn rotate_right(self, n: u32) -> Self {
|
pub const fn rotate_right(self, n: u32) -> Self {
|
||||||
(self as $UnsignedT).rotate_right(n) as Self
|
(self as $UnsignedT).rotate_right(n) as Self
|
||||||
}
|
}
|
||||||
|
@ -430,14 +412,6 @@ assert_eq!(m, ", $swapped, ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Reverses the bit pattern of the integer.
|
concat!("Reverses the bit pattern of the integer.
|
||||||
|
|
||||||
|
@ -456,7 +430,6 @@ assert_eq!(m, ", $reversed, ");
|
||||||
#[unstable(feature = "reverse_bits", issue = "48763")]
|
#[unstable(feature = "reverse_bits", issue = "48763")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn reverse_bits(self) -> Self {
|
pub const fn reverse_bits(self) -> Self {
|
||||||
(self as $UnsignedT).reverse_bits() as Self
|
(self as $UnsignedT).reverse_bits() as Self
|
||||||
}
|
}
|
||||||
|
@ -1007,16 +980,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the
|
concat!("Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the
|
||||||
boundary of the type.
|
boundary of the type.
|
||||||
|
@ -1034,7 +997,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_add(self, rhs: Self) -> Self {
|
pub const fn wrapping_add(self, rhs: Self) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::overflowing_add(self, rhs)
|
intrinsics::overflowing_add(self, rhs)
|
||||||
|
@ -1042,16 +1004,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the
|
concat!("Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the
|
||||||
boundary of the type.
|
boundary of the type.
|
||||||
|
@ -1069,7 +1021,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_sub(self, rhs: Self) -> Self {
|
pub const fn wrapping_sub(self, rhs: Self) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::overflowing_sub(self, rhs)
|
intrinsics::overflowing_sub(self, rhs)
|
||||||
|
@ -1077,16 +1028,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at
|
concat!("Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at
|
||||||
the boundary of the type.
|
the boundary of the type.
|
||||||
|
@ -1103,7 +1044,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_mul(self, rhs: Self) -> Self {
|
pub const fn wrapping_mul(self, rhs: Self) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::overflowing_mul(self, rhs)
|
intrinsics::overflowing_mul(self, rhs)
|
||||||
|
@ -1247,16 +1187,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes
|
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.
|
any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.
|
||||||
|
@ -1278,7 +1208,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "num_wrapping", since = "1.2.0")]
|
#[stable(feature = "num_wrapping", since = "1.2.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_shl(self, rhs: u32) -> Self {
|
pub const fn wrapping_shl(self, rhs: u32) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
|
intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
|
||||||
|
@ -1286,16 +1215,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`
|
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.
|
removes any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.
|
||||||
|
@ -1317,7 +1236,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "num_wrapping", since = "1.2.0")]
|
#[stable(feature = "num_wrapping", since = "1.2.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_shr(self, rhs: u32) -> Self {
|
pub const fn wrapping_shr(self, rhs: u32) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
|
intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
|
||||||
|
@ -1396,18 +1314,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Calculates `self` + `rhs`
|
concat!("Calculates `self` + `rhs`
|
||||||
|
|
||||||
|
@ -1428,7 +1334,6 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (", stringify!($Sel
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) {
|
pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) {
|
||||||
let (a, b) = unsafe {
|
let (a, b) = unsafe {
|
||||||
intrinsics::add_with_overflow(self as $ActualT,
|
intrinsics::add_with_overflow(self as $ActualT,
|
||||||
|
@ -1438,18 +1343,6 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (", stringify!($Sel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Calculates `self` - `rhs`
|
concat!("Calculates `self` - `rhs`
|
||||||
|
|
||||||
|
@ -1470,7 +1363,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_sub(1), (", stringify!($Sel
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
|
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
|
||||||
let (a, b) = unsafe {
|
let (a, b) = unsafe {
|
||||||
intrinsics::sub_with_overflow(self as $ActualT,
|
intrinsics::sub_with_overflow(self as $ActualT,
|
||||||
|
@ -1480,18 +1372,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_sub(1), (", stringify!($Sel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Calculates the multiplication of `self` and `rhs`.
|
concat!("Calculates the multiplication of `self` and `rhs`.
|
||||||
|
|
||||||
|
@ -1510,7 +1390,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) {
|
pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) {
|
||||||
let (a, b) = unsafe {
|
let (a, b) = unsafe {
|
||||||
intrinsics::mul_with_overflow(self as $ActualT,
|
intrinsics::mul_with_overflow(self as $ActualT,
|
||||||
|
@ -1681,14 +1560,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_neg(), (", stringify!($Self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Shifts self left by `rhs` bits.
|
concat!("Shifts self left by `rhs` bits.
|
||||||
|
|
||||||
|
@ -1708,20 +1579,11 @@ $EndFeature, "
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
|
pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
|
||||||
(self.wrapping_shl(rhs), (rhs > ($BITS - 1)))
|
(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! {
|
doc_comment! {
|
||||||
concat!("Shifts self right by `rhs` bits.
|
concat!("Shifts self right by `rhs` bits.
|
||||||
|
|
||||||
|
@ -1741,7 +1603,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
|
pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
|
||||||
(self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
|
(self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
|
||||||
}
|
}
|
||||||
|
@ -2006,12 +1867,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// no docs here
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
|
||||||
#[inline]
|
|
||||||
#[cfg(stage0)]
|
|
||||||
pub fn is_positive(self) -> bool { self > 0 }
|
|
||||||
|
|
||||||
doc_comment! {
|
doc_comment! {
|
||||||
concat!("Returns `true` if `self` is positive and `false` if the number is zero or
|
concat!("Returns `true` if `self` is positive and `false` if the number is zero or
|
||||||
negative.
|
negative.
|
||||||
|
@ -2028,16 +1883,9 @@ $EndFeature, "
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_sign")]
|
#[rustc_const_unstable(feature = "const_int_sign")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn is_positive(self) -> bool { self > 0 }
|
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! {
|
doc_comment! {
|
||||||
concat!("Returns `true` if `self` is negative and `false` if the number is zero or
|
concat!("Returns `true` if `self` is negative and `false` if the number is zero or
|
||||||
positive.
|
positive.
|
||||||
|
@ -2054,18 +1902,9 @@ $EndFeature, "
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_sign")]
|
#[rustc_const_unstable(feature = "const_int_sign")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn is_negative(self) -> bool { self < 0 }
|
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! {
|
doc_comment! {
|
||||||
concat!("Return the memory representation of this integer as a byte array in
|
concat!("Return the memory representation of this integer as a byte array in
|
||||||
big-endian (network) byte order.
|
big-endian (network) byte order.
|
||||||
|
@ -2081,20 +1920,11 @@ assert_eq!(bytes, ", $be_bytes, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
pub const fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
||||||
self.to_be().to_ne_bytes()
|
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! {
|
doc_comment! {
|
||||||
concat!("Return the memory representation of this integer as a byte array in
|
concat!("Return the memory representation of this integer as a byte array in
|
||||||
little-endian byte order.
|
little-endian byte order.
|
||||||
|
@ -2110,20 +1940,11 @@ assert_eq!(bytes, ", $le_bytes, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
pub const fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
||||||
self.to_le().to_ne_bytes()
|
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! {
|
doc_comment! {
|
||||||
concat!("
|
concat!("
|
||||||
Return the memory representation of this integer as a byte array in
|
Return the memory representation of this integer as a byte array in
|
||||||
|
@ -2151,20 +1972,11 @@ assert_eq!(bytes, if cfg!(target_endian = \"big\") {
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
||||||
unsafe { mem::transmute(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! {
|
doc_comment! {
|
||||||
concat!("Create an integer value from its representation as a byte array in
|
concat!("Create an integer value from its representation as a byte array in
|
||||||
big endian.
|
big endian.
|
||||||
|
@ -2180,20 +1992,11 @@ assert_eq!(value, ", $swap_op, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
pub const fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
||||||
Self::from_be(Self::from_ne_bytes(bytes))
|
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! {
|
doc_comment! {
|
||||||
concat!("
|
concat!("
|
||||||
Create an integer value from its representation as a byte array in
|
Create an integer value from its representation as a byte array in
|
||||||
|
@ -2210,20 +2013,11 @@ assert_eq!(value, ", $swap_op, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
||||||
Self::from_le(Self::from_ne_bytes(bytes))
|
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! {
|
doc_comment! {
|
||||||
concat!("Create an integer value from its memory representation as a byte
|
concat!("Create an integer value from its memory representation as a byte
|
||||||
array in native endianness.
|
array in native endianness.
|
||||||
|
@ -2250,7 +2044,6 @@ assert_eq!(value, ", $swap_op, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
||||||
unsafe { mem::transmute(bytes) }
|
unsafe { mem::transmute(bytes) }
|
||||||
}
|
}
|
||||||
|
@ -2479,16 +2272,6 @@ assert_eq!(n.trailing_zeros(), 3);", $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Shifts the bits to the left by a specified amount, `n`,
|
concat!("Shifts the bits to the left by a specified amount, `n`,
|
||||||
wrapping the truncated bits to the end of the resulting integer.
|
wrapping the truncated bits to the end of the resulting integer.
|
||||||
|
@ -2508,22 +2291,11 @@ assert_eq!(n.rotate_left(", $rot, "), m);
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_rotate")]
|
#[rustc_const_unstable(feature = "const_int_rotate")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn rotate_left(self, n: u32) -> Self {
|
pub const fn rotate_left(self, n: u32) -> Self {
|
||||||
(self << (n % $BITS)) | (self >> (($BITS - (n % $BITS)) % $BITS))
|
(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! {
|
doc_comment! {
|
||||||
concat!("Shifts the bits to the right by a specified amount, `n`,
|
concat!("Shifts the bits to the right by a specified amount, `n`,
|
||||||
wrapping the truncated bits to the beginning of the resulting
|
wrapping the truncated bits to the beginning of the resulting
|
||||||
|
@ -2544,7 +2316,6 @@ assert_eq!(n.rotate_right(", $rot, "), m);
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_rotate")]
|
#[rustc_const_unstable(feature = "const_int_rotate")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn rotate_right(self, n: u32) -> Self {
|
pub const fn rotate_right(self, n: u32) -> Self {
|
||||||
(self >> (n % $BITS)) | (self << (($BITS - (n % $BITS)) % $BITS))
|
(self >> (n % $BITS)) | (self << (($BITS - (n % $BITS)) % $BITS))
|
||||||
}
|
}
|
||||||
|
@ -2572,14 +2343,6 @@ assert_eq!(m, ", $swapped, ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Reverses the bit pattern of the integer.
|
concat!("Reverses the bit pattern of the integer.
|
||||||
|
|
||||||
|
@ -2598,7 +2361,6 @@ assert_eq!(m, ", $reversed, ");
|
||||||
#[unstable(feature = "reverse_bits", issue = "48763")]
|
#[unstable(feature = "reverse_bits", issue = "48763")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn reverse_bits(self) -> Self {
|
pub const fn reverse_bits(self) -> Self {
|
||||||
unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
|
unsafe { intrinsics::bitreverse(self as $ActualT) as Self }
|
||||||
}
|
}
|
||||||
|
@ -3087,16 +2849,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Wrapping (modular) addition. Computes `self + rhs`,
|
concat!("Wrapping (modular) addition. Computes `self + rhs`,
|
||||||
wrapping around at the boundary of the type.
|
wrapping around at the boundary of the type.
|
||||||
|
@ -3113,7 +2865,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_add(self, rhs: Self) -> Self {
|
pub const fn wrapping_add(self, rhs: Self) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::overflowing_add(self, rhs)
|
intrinsics::overflowing_add(self, rhs)
|
||||||
|
@ -3121,16 +2872,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Wrapping (modular) subtraction. Computes `self - rhs`,
|
concat!("Wrapping (modular) subtraction. Computes `self - rhs`,
|
||||||
wrapping around at the boundary of the type.
|
wrapping around at the boundary of the type.
|
||||||
|
@ -3147,7 +2888,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_sub(self, rhs: Self) -> Self {
|
pub const fn wrapping_sub(self, rhs: Self) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::overflowing_sub(self, rhs)
|
intrinsics::overflowing_sub(self, rhs)
|
||||||
|
@ -3155,16 +2895,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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 *
|
/// Wrapping (modular) multiplication. Computes `self *
|
||||||
/// rhs`, wrapping around at the boundary of the type.
|
/// rhs`, wrapping around at the boundary of the type.
|
||||||
///
|
///
|
||||||
|
@ -3182,7 +2912,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_mul(self, rhs: Self) -> Self {
|
pub const fn wrapping_mul(self, rhs: Self) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::overflowing_mul(self, rhs)
|
intrinsics::overflowing_mul(self, rhs)
|
||||||
|
@ -3304,16 +3033,6 @@ assert_eq!(100", stringify!($SelfT), ".wrapping_mod_euc(10), 0);
|
||||||
self.overflowing_neg().0
|
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! {
|
doc_comment! {
|
||||||
concat!("Panic-free bitwise shift-left; yields `self << mask(rhs)`,
|
concat!("Panic-free bitwise shift-left; yields `self << mask(rhs)`,
|
||||||
where `mask` removes any high-order bits of `rhs` that
|
where `mask` removes any high-order bits of `rhs` that
|
||||||
|
@ -3337,7 +3056,6 @@ assert_eq!(1", stringify!($SelfT), ".wrapping_shl(128), 1);", $EndFeature, "
|
||||||
#[stable(feature = "num_wrapping", since = "1.2.0")]
|
#[stable(feature = "num_wrapping", since = "1.2.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_shl(self, rhs: u32) -> Self {
|
pub const fn wrapping_shl(self, rhs: u32) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
|
intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
|
||||||
|
@ -3345,16 +3063,6 @@ assert_eq!(1", stringify!($SelfT), ".wrapping_shl(128), 1);", $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Panic-free bitwise shift-right; yields `self >> mask(rhs)`,
|
concat!("Panic-free bitwise shift-right; yields `self >> mask(rhs)`,
|
||||||
where `mask` removes any high-order bits of `rhs` that
|
where `mask` removes any high-order bits of `rhs` that
|
||||||
|
@ -3378,7 +3086,6 @@ assert_eq!(128", stringify!($SelfT), ".wrapping_shr(128), 128);", $EndFeature, "
|
||||||
#[stable(feature = "num_wrapping", since = "1.2.0")]
|
#[stable(feature = "num_wrapping", since = "1.2.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
#[rustc_const_unstable(feature = "const_int_wrapping")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn wrapping_shr(self, rhs: u32) -> Self {
|
pub const fn wrapping_shr(self, rhs: u32) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
|
intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
|
||||||
|
@ -3424,18 +3131,6 @@ assert_eq!(3u8.wrapping_pow(6), 217);", $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Calculates `self` + `rhs`
|
concat!("Calculates `self` + `rhs`
|
||||||
|
|
||||||
|
@ -3456,7 +3151,6 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (0, true));", $EndF
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) {
|
pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) {
|
||||||
let (a, b) = unsafe {
|
let (a, b) = unsafe {
|
||||||
intrinsics::add_with_overflow(self as $ActualT,
|
intrinsics::add_with_overflow(self as $ActualT,
|
||||||
|
@ -3466,18 +3160,6 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (0, true));", $EndF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Calculates `self` - `rhs`
|
concat!("Calculates `self` - `rhs`
|
||||||
|
|
||||||
|
@ -3499,7 +3181,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
|
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
|
||||||
let (a, b) = unsafe {
|
let (a, b) = unsafe {
|
||||||
intrinsics::sub_with_overflow(self as $ActualT,
|
intrinsics::sub_with_overflow(self as $ActualT,
|
||||||
|
@ -3509,18 +3190,6 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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`.
|
/// Calculates the multiplication of `self` and `rhs`.
|
||||||
///
|
///
|
||||||
/// Returns a tuple of the multiplication along with a boolean
|
/// Returns a tuple of the multiplication along with a boolean
|
||||||
|
@ -3541,7 +3210,6 @@ $EndFeature, "
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) {
|
pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) {
|
||||||
let (a, b) = unsafe {
|
let (a, b) = unsafe {
|
||||||
intrinsics::mul_with_overflow(self as $ActualT,
|
intrinsics::mul_with_overflow(self as $ActualT,
|
||||||
|
@ -3680,14 +3348,6 @@ assert_eq!(2", stringify!($SelfT), ".overflowing_neg(), (-2i32 as ", stringify!(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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! {
|
doc_comment! {
|
||||||
concat!("Shifts self left by `rhs` bits.
|
concat!("Shifts self left by `rhs` bits.
|
||||||
|
|
||||||
|
@ -3708,20 +3368,11 @@ assert_eq!(0x1", stringify!($SelfT), ".overflowing_shl(132), (0x10, true));", $E
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
|
pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
|
||||||
(self.wrapping_shl(rhs), (rhs > ($BITS - 1)))
|
(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! {
|
doc_comment! {
|
||||||
concat!("Shifts self right by `rhs` bits.
|
concat!("Shifts self right by `rhs` bits.
|
||||||
|
|
||||||
|
@ -3742,7 +3393,6 @@ assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(132), (0x1, true));", $E
|
||||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||||
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
#[rustc_const_unstable(feature = "const_int_overflowing")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
|
pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
|
||||||
(self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
|
(self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
|
||||||
}
|
}
|
||||||
|
@ -3985,15 +3635,7 @@ $EndFeature, "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// no docs here
|
doc_comment! {
|
||||||
#[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
|
concat!("Return the memory representation of this integer as a byte array in
|
||||||
big-endian (network) byte order.
|
big-endian (network) byte order.
|
||||||
|
|
||||||
|
@ -4008,20 +3650,11 @@ assert_eq!(bytes, ", $be_bytes, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
pub const fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
||||||
self.to_be().to_ne_bytes()
|
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! {
|
doc_comment! {
|
||||||
concat!("Return the memory representation of this integer as a byte array in
|
concat!("Return the memory representation of this integer as a byte array in
|
||||||
little-endian byte order.
|
little-endian byte order.
|
||||||
|
@ -4037,20 +3670,11 @@ assert_eq!(bytes, ", $le_bytes, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
pub const fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
||||||
self.to_le().to_ne_bytes()
|
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! {
|
doc_comment! {
|
||||||
concat!("
|
concat!("
|
||||||
Return the memory representation of this integer as a byte array in
|
Return the memory representation of this integer as a byte array in
|
||||||
|
@ -4078,20 +3702,11 @@ assert_eq!(bytes, if cfg!(target_endian = \"big\") {
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
||||||
unsafe { mem::transmute(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! {
|
doc_comment! {
|
||||||
concat!("Create an integer value from its representation as a byte array in
|
concat!("Create an integer value from its representation as a byte array in
|
||||||
big endian.
|
big endian.
|
||||||
|
@ -4107,20 +3722,11 @@ assert_eq!(value, ", $swap_op, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
pub const fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
||||||
Self::from_be(Self::from_ne_bytes(bytes))
|
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! {
|
doc_comment! {
|
||||||
concat!("
|
concat!("
|
||||||
Create an integer value from its representation as a byte array in
|
Create an integer value from its representation as a byte array in
|
||||||
|
@ -4137,20 +3743,11 @@ assert_eq!(value, ", $swap_op, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
||||||
Self::from_le(Self::from_ne_bytes(bytes))
|
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! {
|
doc_comment! {
|
||||||
concat!("Create an integer value from its memory representation as a byte
|
concat!("Create an integer value from its memory representation as a byte
|
||||||
array in native endianness.
|
array in native endianness.
|
||||||
|
@ -4177,7 +3774,6 @@ assert_eq!(value, ", $swap_op, ");
|
||||||
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
|
||||||
#[rustc_const_unstable(feature = "const_int_conversion")]
|
#[rustc_const_unstable(feature = "const_int_conversion")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
||||||
unsafe { mem::transmute(bytes) }
|
unsafe { mem::transmute(bytes) }
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
html_playground_url = "https://play.rust-lang.org/",
|
html_playground_url = "https://play.rust-lang.org/",
|
||||||
test(attr(deny(warnings))))]
|
test(attr(deny(warnings))))]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
|
|
||||||
pub use self::Piece::*;
|
pub use self::Piece::*;
|
||||||
pub use self::Position::*;
|
pub use self::Position::*;
|
||||||
|
|
|
@ -288,7 +288,7 @@
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/",
|
html_root_url = "https://doc.rust-lang.org/nightly/",
|
||||||
test(attr(allow(unused_variables), deny(warnings))))]
|
test(attr(allow(unused_variables), deny(warnings))))]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(str_escape)]
|
#![feature(str_escape)]
|
||||||
|
|
||||||
use self::LabelText::*;
|
use self::LabelText::*;
|
||||||
|
|
|
@ -24,14 +24,13 @@
|
||||||
|
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(panic_runtime)]
|
#![feature(panic_runtime)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
|
|
||||||
// Rust's "try" function, but if we're aborting on panics we just call the
|
// 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.
|
// function as there's nothing else we need to do here.
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8),
|
pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8),
|
||||||
data: *mut u8,
|
data: *mut u8,
|
||||||
|
@ -51,7 +50,6 @@ pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8),
|
||||||
// which would break compat with XP. For now just use `intrinsics::abort` which
|
// 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
|
// will kill us with an illegal instruction, which will do a good enough job for
|
||||||
// now hopefully.
|
// now hopefully.
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
pub unsafe extern fn __rust_start_panic(_payload: usize) -> u32 {
|
pub unsafe extern fn __rust_start_panic(_payload: usize) -> u32 {
|
||||||
abort();
|
abort();
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(panic_unwind)]
|
#![feature(panic_unwind)]
|
||||||
#![feature(raw)]
|
#![feature(raw)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
test(no_crate_inject, attr(deny(warnings))),
|
test(no_crate_inject, attr(deny(warnings))),
|
||||||
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
|
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
|
|
|
@ -15,5 +15,5 @@
|
||||||
reason = "internal implementation detail of rustc right now",
|
reason = "internal implementation detail of rustc right now",
|
||||||
issue = "0")]
|
issue = "0")]
|
||||||
#![allow(unused_features)]
|
#![allow(unused_features)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
|
|
|
@ -42,16 +42,14 @@
|
||||||
|
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![cfg_attr(stage0, feature(const_fn))]
|
#![feature(min_const_fn)]
|
||||||
#![cfg_attr(not(stage0), feature(min_const_fn))]
|
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
#![cfg_attr(windows, feature(libc))]
|
#![cfg_attr(windows, feature(libc))]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![feature(extern_types)]
|
#![feature(extern_types)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(non_exhaustive)]
|
#![feature(non_exhaustive)]
|
||||||
#![feature(proc_macro_internals)]
|
#![feature(proc_macro_internals)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
|
@ -59,7 +57,6 @@
|
||||||
#![feature(refcell_replace_swap)]
|
#![feature(refcell_replace_swap)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![cfg_attr(stage0, feature(attr_literals))]
|
|
||||||
#![feature(slice_patterns)]
|
#![feature(slice_patterns)]
|
||||||
#![feature(slice_sort_by_cached_key)]
|
#![feature(slice_sort_by_cached_key)]
|
||||||
#![feature(specialization)]
|
#![feature(specialization)]
|
||||||
|
@ -70,10 +67,9 @@
|
||||||
#![feature(step_trait)]
|
#![feature(step_trait)]
|
||||||
#![feature(integer_atomics)]
|
#![feature(integer_atomics)]
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
#![cfg_attr(not(stage0), feature(impl_header_lifetime_elision))]
|
#![feature(impl_header_lifetime_elision)]
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
#![cfg_attr(stage0, feature(crate_in_paths))]
|
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
|
|
||||||
#![recursion_limit="512"]
|
#![recursion_limit="512"]
|
||||||
|
|
|
@ -168,8 +168,6 @@ impl_stable_hash_for!(struct ::middle::region::FirstStatementIndex { private });
|
||||||
|
|
||||||
// compilation error if size of `ScopeData` is not the same as a `u32`
|
// compilation error if size of `ScopeData` is not the same as a `u32`
|
||||||
#[allow(dead_code)]
|
#[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];
|
static ASSERT: () = [()][!(mem::size_of::<ScopeData>() == 4) as usize];
|
||||||
|
|
||||||
impl Scope {
|
impl Scope {
|
||||||
|
|
|
@ -829,10 +829,10 @@ impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for TypeckTables<'gcx> {
|
||||||
impl<'tcx> CommonTypes<'tcx> {
|
impl<'tcx> CommonTypes<'tcx> {
|
||||||
fn new(interners: &CtxtInterners<'tcx>) -> CommonTypes<'tcx> {
|
fn new(interners: &CtxtInterners<'tcx>) -> CommonTypes<'tcx> {
|
||||||
// Ensure our type representation does not grow
|
// Ensure our type representation does not grow
|
||||||
#[cfg(all(not(stage0), target_pointer_width = "64"))]
|
#[cfg(target_pointer_width = "64")]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
static ASSERT_TY_KIND: () = [()][!(::std::mem::size_of::<ty::TyKind>() <= 24) as usize];
|
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)]
|
#[allow(dead_code)]
|
||||||
static ASSERT_TYS: () = [()][!(::std::mem::size_of::<ty::TyS>() <= 32) as usize];
|
static ASSERT_TYS: () = [()][!(::std::mem::size_of::<ty::TyS>() <= 32) as usize];
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
|
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(try_from)]
|
#![feature(try_from)]
|
||||||
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
|
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
|
||||||
#[allow(unused_extern_crates)]
|
#[allow(unused_extern_crates)]
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#![sanitizer_runtime]
|
#![sanitizer_runtime]
|
||||||
#![feature(alloc_system)]
|
#![feature(alloc_system)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(sanitizer_runtime)]
|
#![feature(sanitizer_runtime)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
|
|
||||||
#![recursion_limit="256"]
|
#![recursion_limit="256"]
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![allow(unused_attributes)]
|
#![allow(unused_attributes)]
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
#![feature(range_contains)]
|
#![feature(range_contains)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(custom_attribute)]
|
#![feature(custom_attribute)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![allow(unused_attributes)]
|
#![allow(unused_attributes)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// See Cargo.toml for a comment explaining this crate.
|
// See Cargo.toml for a comment explaining this crate.
|
||||||
#![allow(unused_extern_crates)]
|
#![allow(unused_extern_crates)]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
|
|
||||||
extern crate bitflags;
|
extern crate bitflags;
|
||||||
extern crate log;
|
extern crate log;
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
#![feature(unsize)]
|
#![feature(unsize)]
|
||||||
#![feature(specialization)]
|
#![feature(specialization)]
|
||||||
#![feature(optin_builtin_traits)]
|
#![feature(optin_builtin_traits)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
#![feature(nll)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
|
||||||
#![feature(allow_internal_unstable)]
|
#![feature(allow_internal_unstable)]
|
||||||
#![feature(vec_resize_with)]
|
#![feature(vec_resize_with)]
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![cfg_attr(unix, feature(libc))]
|
#![cfg_attr(unix, feature(libc))]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(option_replace)]
|
#![feature(option_replace)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#![allow(unused_attributes)]
|
#![allow(unused_attributes)]
|
||||||
#![feature(range_contains)]
|
#![feature(range_contains)]
|
||||||
#![cfg_attr(unix, feature(libc))]
|
#![cfg_attr(unix, feature(libc))]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(optin_builtin_traits)]
|
#![feature(optin_builtin_traits)]
|
||||||
|
|
||||||
extern crate atty;
|
extern crate atty;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(specialization)]
|
#![feature(specialization)]
|
||||||
|
|
||||||
#![recursion_limit="256"]
|
#![recursion_limit="256"]
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
#![cfg_attr(test, feature(test))]
|
#![cfg_attr(test, feature(test))]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
#![feature(nll)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(static_nobundle)]
|
#![feature(static_nobundle)]
|
||||||
|
|
||||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#![sanitizer_runtime]
|
#![sanitizer_runtime]
|
||||||
#![feature(alloc_system)]
|
#![feature(alloc_system)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(sanitizer_runtime)]
|
#![feature(sanitizer_runtime)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(proc_macro_internals)]
|
#![feature(proc_macro_internals)]
|
||||||
#![feature(proc_macro_quote)]
|
#![feature(proc_macro_quote)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
|
|
|
@ -25,12 +25,10 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(const_fn)]
|
#![feature(const_fn)]
|
||||||
#![feature(decl_macro)]
|
#![feature(decl_macro)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![feature(range_contains)]
|
#![feature(range_contains)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![cfg_attr(stage0, feature(attr_literals))]
|
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![feature(specialization)]
|
#![feature(specialization)]
|
||||||
#![feature(try_trait)]
|
#![feature(try_trait)]
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#![sanitizer_runtime]
|
#![sanitizer_runtime]
|
||||||
#![feature(alloc_system)]
|
#![feature(alloc_system)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(sanitizer_runtime)]
|
#![feature(sanitizer_runtime)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#![allow(nonstandard_style)]
|
#![allow(nonstandard_style)]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
|
|
||||||
pub struct Intrinsic {
|
pub struct Intrinsic {
|
||||||
pub inputs: &'static [&'static Type],
|
pub inputs: &'static [&'static Type],
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
|
||||||
#[macro_use] extern crate syntax;
|
#[macro_use] extern crate syntax;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
|
||||||
#![recursion_limit="256"]
|
#![recursion_limit="256"]
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
#![feature(slice_sort_by_cached_key)]
|
#![feature(slice_sort_by_cached_key)]
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
#![feature(custom_attribute)]
|
#![feature(custom_attribute)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![allow(unused_attributes)]
|
#![allow(unused_attributes)]
|
||||||
|
|
||||||
#![recursion_limit="256"]
|
#![recursion_limit="256"]
|
||||||
|
|
|
@ -22,9 +22,8 @@
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![cfg_attr(stage0, feature(const_fn))]
|
#![feature(min_const_fn)]
|
||||||
#![cfg_attr(not(stage0), feature(min_const_fn))]
|
#![feature(nll)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
|
||||||
#![feature(slice_patterns)]
|
#![feature(slice_patterns)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
|
@ -11,11 +11,9 @@
|
||||||
//! New recursive solver modeled on Chalk's recursive solver. Most of
|
//! New recursive solver modeled on Chalk's recursive solver. Most of
|
||||||
//! the guts are broken up into modules; see the comments in those modules.
|
//! the guts are broken up into modules; see the comments in those modules.
|
||||||
|
|
||||||
#![cfg_attr(stage0, feature(crate_in_paths))]
|
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![cfg_attr(stage0, feature(extern_prelude))]
|
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
|
|
||||||
#![recursion_limit="256"]
|
#![recursion_limit="256"]
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#![sanitizer_runtime]
|
#![sanitizer_runtime]
|
||||||
#![feature(alloc_system)]
|
#![feature(alloc_system)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(sanitizer_runtime)]
|
#![feature(sanitizer_runtime)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
|
@ -75,7 +75,7 @@ This API is completely unstable and subject to change.
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
#![feature(refcell_replace_swap)]
|
#![feature(refcell_replace_swap)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(set_stdio)]
|
#![feature(set_stdio)]
|
||||||
#![feature(slice_sort_by_cached_key)]
|
#![feature(slice_sort_by_cached_key)]
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
|
|
|
@ -24,7 +24,7 @@ Core encoding and decoding interfaces.
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(specialization)]
|
#![feature(specialization)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![cfg_attr(test, feature(test))]
|
#![cfg_attr(test, feature(test))]
|
||||||
|
|
||||||
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable};
|
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable};
|
||||||
|
|
|
@ -151,14 +151,12 @@ pub mod __default_lib_allocator {
|
||||||
// ABI
|
// ABI
|
||||||
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
pub unsafe extern fn __rdl_alloc(size: usize, align: usize) -> *mut u8 {
|
pub unsafe extern fn __rdl_alloc(size: usize, align: usize) -> *mut u8 {
|
||||||
let layout = Layout::from_size_align_unchecked(size, align);
|
let layout = Layout::from_size_align_unchecked(size, align);
|
||||||
System.alloc(layout)
|
System.alloc(layout)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
pub unsafe extern fn __rdl_dealloc(ptr: *mut u8,
|
pub unsafe extern fn __rdl_dealloc(ptr: *mut u8,
|
||||||
size: usize,
|
size: usize,
|
||||||
align: usize) {
|
align: usize) {
|
||||||
|
@ -166,7 +164,6 @@ pub mod __default_lib_allocator {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
pub unsafe extern fn __rdl_realloc(ptr: *mut u8,
|
pub unsafe extern fn __rdl_realloc(ptr: *mut u8,
|
||||||
old_size: usize,
|
old_size: usize,
|
||||||
align: usize,
|
align: usize,
|
||||||
|
@ -176,7 +173,6 @@ pub mod __default_lib_allocator {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_std_internal_symbol]
|
#[rustc_std_internal_symbol]
|
||||||
#[cfg_attr(stage0, no_mangle)]
|
|
||||||
pub unsafe extern fn __rdl_alloc_zeroed(size: usize, align: usize) -> *mut u8 {
|
pub unsafe extern fn __rdl_alloc_zeroed(size: usize, align: usize) -> *mut u8 {
|
||||||
let layout = Layout::from_size_align_unchecked(size, align);
|
let layout = Layout::from_size_align_unchecked(size, align);
|
||||||
System.alloc_zeroed(layout)
|
System.alloc_zeroed(layout)
|
||||||
|
|
|
@ -250,8 +250,7 @@
|
||||||
#![feature(cfg_target_vendor)]
|
#![feature(cfg_target_vendor)]
|
||||||
#![feature(char_error_internals)]
|
#![feature(char_error_internals)]
|
||||||
#![feature(compiler_builtins_lib)]
|
#![feature(compiler_builtins_lib)]
|
||||||
#![cfg_attr(stage0, feature(const_fn))]
|
#![feature(min_const_fn)]
|
||||||
#![cfg_attr(not(stage0), feature(min_const_fn))]
|
|
||||||
#![feature(const_int_ops)]
|
#![feature(const_int_ops)]
|
||||||
#![feature(const_ip)]
|
#![feature(const_ip)]
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
|
@ -270,10 +269,9 @@
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![feature(link_args)]
|
#![feature(link_args)]
|
||||||
#![feature(linkage)]
|
#![feature(linkage)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(needs_panic_runtime)]
|
#![feature(needs_panic_runtime)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![feature(on_unimplemented)]
|
#![feature(on_unimplemented)]
|
||||||
#![feature(optin_builtin_traits)]
|
#![feature(optin_builtin_traits)]
|
||||||
|
@ -286,7 +284,7 @@
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![feature(rustc_const_unstable)]
|
#![feature(rustc_const_unstable)]
|
||||||
#![feature(std_internals)]
|
#![feature(std_internals)]
|
||||||
#![feature(stdsimd)]
|
#![cfg_attr(not(stage0), feature(stdsimd))]
|
||||||
#![feature(shrink_to)]
|
#![feature(shrink_to)]
|
||||||
#![feature(slice_concat_ext)]
|
#![feature(slice_concat_ext)]
|
||||||
#![feature(slice_internals)]
|
#![feature(slice_internals)]
|
||||||
|
@ -302,15 +300,12 @@
|
||||||
#![feature(unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
#![feature(untagged_unions)]
|
#![feature(untagged_unions)]
|
||||||
#![feature(unwind_attributes)]
|
#![feature(unwind_attributes)]
|
||||||
#![cfg_attr(stage0, feature(use_extern_macros))]
|
|
||||||
#![feature(doc_cfg)]
|
#![feature(doc_cfg)]
|
||||||
#![feature(doc_masked)]
|
#![feature(doc_masked)]
|
||||||
#![feature(doc_spotlight)]
|
#![feature(doc_spotlight)]
|
||||||
#![cfg_attr(all(windows, stage0), feature(used))]
|
|
||||||
#![feature(doc_alias)]
|
#![feature(doc_alias)]
|
||||||
#![feature(doc_keyword)]
|
#![feature(doc_keyword)]
|
||||||
#![feature(panic_info_message)]
|
#![feature(panic_info_message)]
|
||||||
#![cfg_attr(stage0, feature(panic_implementation))]
|
|
||||||
#![feature(non_exhaustive)]
|
#![feature(non_exhaustive)]
|
||||||
|
|
||||||
#![default_lib_allocator]
|
#![default_lib_allocator]
|
||||||
|
|
|
@ -319,8 +319,7 @@ pub fn panicking() -> bool {
|
||||||
|
|
||||||
/// Entry point of panic from the libcore crate.
|
/// Entry point of panic from the libcore crate.
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[cfg_attr(stage0, panic_implementation)]
|
#[panic_handler]
|
||||||
#[cfg_attr(not(stage0), panic_handler)]
|
|
||||||
#[unwind(allowed)]
|
#[unwind(allowed)]
|
||||||
pub fn rust_begin_panic(info: &PanicInfo) -> ! {
|
pub fn rust_begin_panic(info: &PanicInfo) -> ! {
|
||||||
continue_panic_fmt(&info)
|
continue_panic_fmt(&info)
|
||||||
|
@ -398,7 +397,7 @@ fn continue_panic_fmt(info: &PanicInfo) -> ! {
|
||||||
#[unstable(feature = "libstd_sys_internals",
|
#[unstable(feature = "libstd_sys_internals",
|
||||||
reason = "used by the panic! macro",
|
reason = "used by the panic! macro",
|
||||||
issue = "0")]
|
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
|
#[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)) -> ! {
|
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.
|
// Note that this should be the only allocation performed in this code path.
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
#![feature(slice_sort_by_cached_key)]
|
#![feature(slice_sort_by_cached_key)]
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#![feature(proc_macro_internals)]
|
#![feature(proc_macro_internals)]
|
||||||
#![feature(decl_macro)]
|
#![feature(decl_macro)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(str_escape)]
|
#![feature(str_escape)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
#![feature(const_fn)]
|
#![feature(const_fn)]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(custom_attribute)]
|
#![feature(custom_attribute)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(non_exhaustive)]
|
#![feature(non_exhaustive)]
|
||||||
#![feature(optin_builtin_traits)]
|
#![feature(optin_builtin_traits)]
|
||||||
#![feature(specialization)]
|
#![feature(specialization)]
|
||||||
#![feature(stdsimd)]
|
#![cfg_attr(not(stage0), feature(stdsimd))]
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
#![cfg_attr(windows, feature(libc))]
|
#![cfg_attr(windows, feature(libc))]
|
||||||
// Handle rustfmt skips
|
// Handle rustfmt skips
|
||||||
#![feature(custom_attribute)]
|
#![feature(custom_attribute)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![allow(unused_attributes)]
|
#![allow(unused_attributes)]
|
||||||
|
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#![feature(asm)]
|
#![feature(asm)]
|
||||||
#![feature(fnbox)]
|
#![feature(fnbox)]
|
||||||
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))]
|
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(set_stdio)]
|
#![feature(set_stdio)]
|
||||||
#![feature(panic_unwind)]
|
#![feature(panic_unwind)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#![feature(cfg_target_vendor)]
|
#![feature(cfg_target_vendor)]
|
||||||
#![feature(link_cfg)]
|
#![feature(link_cfg)]
|
||||||
#![cfg_attr(not(stage0), feature(nll))]
|
#![feature(nll)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![feature(unwind_attributes)]
|
#![feature(unwind_attributes)]
|
||||||
#![feature(static_nobundle)]
|
#![feature(static_nobundle)]
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
|
# 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`.
|
# `0.x.0` for Cargo where they were released on `date`.
|
||||||
|
|
||||||
date: 2018-09-11
|
date: 2018-09-23
|
||||||
rustc: beta
|
rustc: beta
|
||||||
cargo: beta
|
cargo: beta
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#![feature(plugin_registrar, rustc_private)]
|
#![feature(plugin_registrar, rustc_private)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
||||||
#[macro_use] extern crate rustc;
|
#[macro_use] extern crate rustc;
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#![feature(plugin_registrar)]
|
#![feature(plugin_registrar)]
|
||||||
#![feature(box_syntax, rustc_private)]
|
#![feature(box_syntax, rustc_private)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
||||||
// Load rustc as a plugin to get macros
|
// Load rustc as a plugin to get macros
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#![feature(plugin_registrar)]
|
#![feature(plugin_registrar)]
|
||||||
#![feature(box_syntax, rustc_private)]
|
#![feature(box_syntax, rustc_private)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#![feature(plugin_registrar, rustc_private)]
|
#![feature(plugin_registrar, rustc_private)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
||||||
#[macro_use] extern crate rustc;
|
#[macro_use] extern crate rustc;
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(box_syntax, plugin, plugin_registrar, rustc_private)]
|
#![feature(box_syntax, plugin, plugin_registrar, rustc_private)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
#![crate_type = "dylib"]
|
#![crate_type = "dylib"]
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// run-pass
|
// run-pass
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
|
|
||||||
//{{{ issue 40569 ==============================================================
|
//{{{ issue 40569 ==============================================================
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
// run-pass
|
// run-pass
|
||||||
#![allow(dead_code, unused_imports)]
|
#![allow(dead_code, unused_imports)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#![feature(plugin_registrar)]
|
#![feature(plugin_registrar)]
|
||||||
#![feature(box_syntax, rustc_private)]
|
#![feature(box_syntax, rustc_private)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
||||||
// Load rustc as a plugin to get macros
|
// Load rustc as a plugin to get macros
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#![feature(plugin_registrar)]
|
#![feature(plugin_registrar)]
|
||||||
#![feature(box_syntax, rustc_private)]
|
#![feature(box_syntax, rustc_private)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#![feature(plugin_registrar)]
|
#![feature(plugin_registrar)]
|
||||||
#![feature(box_syntax, rustc_private)]
|
#![feature(box_syntax, rustc_private)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
|
|
||||||
macro_rules! foo {
|
macro_rules! foo {
|
||||||
($($p:vis)*) => {} //~ ERROR repetition matches empty token tree
|
($($p:vis)*) => {} //~ ERROR repetition matches empty token tree
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
// compile-pass
|
// compile-pass
|
||||||
|
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
|
|
||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
#![warn(unreachable_pub)]
|
#![warn(unreachable_pub)]
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
// compile-pass
|
// compile-pass
|
||||||
|
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![cfg_attr(stage0, feature(macro_vis_matcher))]
|
|
||||||
|
|
||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
#![warn(unreachable_pub)]
|
#![warn(unreachable_pub)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue