Apply cfg-bootstrap switch
This commit is contained in:
parent
e9bc25dc34
commit
b221c877e8
@ -3,7 +3,6 @@
|
|||||||
#![feature(bool_to_option)]
|
#![feature(bool_to_option)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![cfg_attr(bootstrap, feature(format_args_capture))]
|
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![feature(iter_zip)]
|
#![feature(iter_zip)]
|
||||||
#![feature(let_else)]
|
#![feature(let_else)]
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(backtrace)]
|
#![feature(backtrace)]
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
#![cfg_attr(bootstrap, feature(format_args_capture))]
|
|
||||||
#![feature(iter_zip)]
|
#![feature(iter_zip)]
|
||||||
#![feature(let_else)]
|
#![feature(let_else)]
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(decl_macro)]
|
#![feature(decl_macro)]
|
||||||
#![feature(destructuring_assignment)]
|
#![feature(destructuring_assignment)]
|
||||||
#![cfg_attr(bootstrap, feature(format_args_capture))]
|
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
#![feature(iter_zip)]
|
#![feature(iter_zip)]
|
||||||
#![feature(let_else)]
|
#![feature(let_else)]
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
#![feature(bool_to_option)]
|
#![feature(bool_to_option)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![cfg_attr(bootstrap, feature(format_args_capture))]
|
|
||||||
#![feature(iter_order_by)]
|
#![feature(iter_order_by)]
|
||||||
#![feature(iter_zip)]
|
#![feature(iter_zip)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![cfg_attr(bootstrap, feature(format_args_capture))]
|
|
||||||
#![feature(iter_zip)]
|
#![feature(iter_zip)]
|
||||||
#![feature(map_try_insert)]
|
#![feature(map_try_insert)]
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
#![feature(bool_to_option)]
|
#![feature(bool_to_option)]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![cfg_attr(bootstrap, feature(format_args_capture))]
|
|
||||||
#![feature(iter_zip)]
|
#![feature(iter_zip)]
|
||||||
#![feature(let_else)]
|
#![feature(let_else)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
@ -58,7 +58,6 @@
|
|||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
#![feature(bool_to_option)]
|
#![feature(bool_to_option)]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![cfg_attr(bootstrap, feature(format_args_capture))]
|
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![feature(is_sorted)]
|
#![feature(is_sorted)]
|
||||||
|
@ -105,7 +105,6 @@
|
|||||||
#![feature(fmt_internals)]
|
#![feature(fmt_internals)]
|
||||||
#![feature(fn_traits)]
|
#![feature(fn_traits)]
|
||||||
#![feature(inherent_ascii_escape)]
|
#![feature(inherent_ascii_escape)]
|
||||||
#![cfg_attr(bootstrap, feature(format_args_capture))]
|
|
||||||
#![feature(inplace_iteration)]
|
#![feature(inplace_iteration)]
|
||||||
#![feature(iter_advance_by)]
|
#![feature(iter_advance_by)]
|
||||||
#![feature(iter_zip)]
|
#![feature(iter_zip)]
|
||||||
|
@ -330,11 +330,9 @@ fn index_mut(&mut self, index: I) -> &mut Self::Output {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[stable(feature = "copy_clone_array_lib", since = "1.58.0")]
|
#[stable(feature = "copy_clone_array_lib", since = "1.58.0")]
|
||||||
impl<T: Copy, const N: usize> Copy for [T; N] {}
|
impl<T: Copy, const N: usize> Copy for [T; N] {}
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[stable(feature = "copy_clone_array_lib", since = "1.58.0")]
|
#[stable(feature = "copy_clone_array_lib", since = "1.58.0")]
|
||||||
impl<T: Clone, const N: usize> Clone for [T; N] {
|
impl<T: Clone, const N: usize> Clone for [T; N] {
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -348,12 +346,10 @@ fn clone_from(&mut self, other: &Self) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
trait SpecArrayClone: Clone {
|
trait SpecArrayClone: Clone {
|
||||||
fn clone<const N: usize>(array: &[Self; N]) -> [Self; N];
|
fn clone<const N: usize>(array: &[Self; N]) -> [Self; N];
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
impl<T: Clone> SpecArrayClone for T {
|
impl<T: Clone> SpecArrayClone for T {
|
||||||
#[inline]
|
#[inline]
|
||||||
default fn clone<const N: usize>(array: &[T; N]) -> [T; N] {
|
default fn clone<const N: usize>(array: &[T; N]) -> [T; N] {
|
||||||
@ -363,7 +359,6 @@ impl<T: Clone> SpecArrayClone for T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
impl<T: Copy> SpecArrayClone for T {
|
impl<T: Copy> SpecArrayClone for T {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn clone<const N: usize>(array: &[T; N]) -> [T; N] {
|
fn clone<const N: usize>(array: &[T; N]) -> [T; N] {
|
||||||
|
@ -159,14 +159,12 @@
|
|||||||
#![feature(const_impl_trait)]
|
#![feature(const_impl_trait)]
|
||||||
#![feature(const_mut_refs)]
|
#![feature(const_mut_refs)]
|
||||||
#![feature(const_precise_live_drops)]
|
#![feature(const_precise_live_drops)]
|
||||||
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
|
|
||||||
#![feature(const_refs_to_cell)]
|
#![feature(const_refs_to_cell)]
|
||||||
#![feature(decl_macro)]
|
#![feature(decl_macro)]
|
||||||
#![feature(derive_default_enum)]
|
#![feature(derive_default_enum)]
|
||||||
#![feature(doc_cfg)]
|
#![feature(doc_cfg)]
|
||||||
#![feature(doc_notable_trait)]
|
#![feature(doc_notable_trait)]
|
||||||
#![cfg_attr(bootstrap, feature(doc_primitive))]
|
#![feature(rustdoc_internals)]
|
||||||
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
|
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![feature(doc_cfg_hide)]
|
#![feature(doc_cfg_hide)]
|
||||||
#![feature(extern_types)]
|
#![feature(extern_types)]
|
||||||
@ -198,7 +196,7 @@
|
|||||||
#![feature(try_blocks)]
|
#![feature(try_blocks)]
|
||||||
#![feature(unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
#![feature(unsized_fn_params)]
|
#![feature(unsized_fn_params)]
|
||||||
#![cfg_attr(not(bootstrap), feature(asm_const))]
|
#![feature(asm_const)]
|
||||||
//
|
//
|
||||||
// Target features:
|
// Target features:
|
||||||
#![feature(aarch64_target_feature)]
|
#![feature(aarch64_target_feature)]
|
||||||
@ -408,13 +406,11 @@ pub mod arch {
|
|||||||
#[allow(rustdoc::bare_urls)]
|
#[allow(rustdoc::bare_urls)]
|
||||||
#[unstable(feature = "portable_simd", issue = "86656")]
|
#[unstable(feature = "portable_simd", issue = "86656")]
|
||||||
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
|
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
mod core_simd;
|
mod core_simd;
|
||||||
|
|
||||||
#[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
|
#[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
|
||||||
#[unstable(feature = "portable_simd", issue = "86656")]
|
#[unstable(feature = "portable_simd", issue = "86656")]
|
||||||
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
|
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub mod simd {
|
pub mod simd {
|
||||||
#[unstable(feature = "portable_simd", issue = "86656")]
|
#[unstable(feature = "portable_simd", issue = "86656")]
|
||||||
pub use crate::core_simd::simd::*;
|
pub use crate::core_simd::simd::*;
|
||||||
|
@ -789,7 +789,6 @@ pub unsafe fn assume_init_drop(&mut self) {
|
|||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "maybe_uninit_ref", since = "1.55.0")]
|
#[stable(feature = "maybe_uninit_ref", since = "1.55.0")]
|
||||||
#[rustc_const_stable(feature = "const_maybe_uninit_assume_init", since = "1.59.0")]
|
#[rustc_const_stable(feature = "const_maybe_uninit_assume_init", since = "1.59.0")]
|
||||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_raw_ptr_deref))]
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub const unsafe fn assume_init_ref(&self) -> &T {
|
pub const unsafe fn assume_init_ref(&self) -> &T {
|
||||||
// SAFETY: the caller must guarantee that `self` is initialized.
|
// SAFETY: the caller must guarantee that `self` is initialized.
|
||||||
|
@ -82,7 +82,7 @@ pub trait Generator<R = ()> {
|
|||||||
/// `return` statement or implicitly as the last expression of a generator
|
/// `return` statement or implicitly as the last expression of a generator
|
||||||
/// literal. For example futures would use this as `Result<T, E>` as it
|
/// literal. For example futures would use this as `Result<T, E>` as it
|
||||||
/// represents a completed future.
|
/// represents a completed future.
|
||||||
#[cfg_attr(not(bootstrap), lang = "generator_return")]
|
#[lang = "generator_return"]
|
||||||
type Return;
|
type Return;
|
||||||
|
|
||||||
/// Resumes the execution of this generator.
|
/// Resumes the execution of this generator.
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// In debug builds checks that `data` pointer is aligned and non-null and that slice with given `len` would cover less than half the address space
|
// In debug builds checks that `data` pointer is aligned and non-null and that slice with given `len` would cover less than half the address space
|
||||||
#[cfg(all(not(bootstrap), debug_assertions))]
|
#[cfg(debug_assertions)]
|
||||||
#[unstable(feature = "const_slice_from_raw_parts", issue = "67456")]
|
#[unstable(feature = "const_slice_from_raw_parts", issue = "67456")]
|
||||||
#[rustc_const_unstable(feature = "const_slice_from_raw_parts", issue = "67456")]
|
#[rustc_const_unstable(feature = "const_slice_from_raw_parts", issue = "67456")]
|
||||||
const fn debug_check_data_len<T>(data: *const T, len: usize) {
|
const fn debug_check_data_len<T>(data: *const T, len: usize) {
|
||||||
@ -161,7 +161,7 @@ const fn noop<T>(_: *const T) {}
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(all(not(bootstrap), debug_assertions)))]
|
#[cfg(not(debug_assertions))]
|
||||||
const fn debug_check_data_len<T>(_data: *const T, _len: usize) {}
|
const fn debug_check_data_len<T>(_data: *const T, _len: usize) {}
|
||||||
|
|
||||||
/// Converts a reference to T into a slice of length 1 (without copying).
|
/// Converts a reference to T into a slice of length 1 (without copying).
|
||||||
|
@ -182,7 +182,6 @@ impl Duration {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
||||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_panic))]
|
|
||||||
pub const fn new(secs: u64, nanos: u32) -> Duration {
|
pub const fn new(secs: u64, nanos: u32) -> Duration {
|
||||||
let secs = match secs.checked_add((nanos / NANOS_PER_SEC) as u64) {
|
let secs = match secs.checked_add((nanos / NANOS_PER_SEC) as u64) {
|
||||||
Some(secs) => secs,
|
Some(secs) => secs,
|
||||||
@ -482,7 +481,6 @@ pub const fn as_nanos(&self) -> u128 {
|
|||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
||||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_panic))]
|
|
||||||
pub const fn checked_add(self, rhs: Duration) -> Option<Duration> {
|
pub const fn checked_add(self, rhs: Duration) -> Option<Duration> {
|
||||||
if let Some(mut secs) = self.secs.checked_add(rhs.secs) {
|
if let Some(mut secs) = self.secs.checked_add(rhs.secs) {
|
||||||
let mut nanos = self.nanos + rhs.nanos;
|
let mut nanos = self.nanos + rhs.nanos;
|
||||||
@ -543,7 +541,6 @@ pub const fn saturating_add(self, rhs: Duration) -> Duration {
|
|||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
||||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_panic))]
|
|
||||||
pub const fn checked_sub(self, rhs: Duration) -> Option<Duration> {
|
pub const fn checked_sub(self, rhs: Duration) -> Option<Duration> {
|
||||||
if let Some(mut secs) = self.secs.checked_sub(rhs.secs) {
|
if let Some(mut secs) = self.secs.checked_sub(rhs.secs) {
|
||||||
let nanos = if self.nanos >= rhs.nanos {
|
let nanos = if self.nanos >= rhs.nanos {
|
||||||
@ -602,7 +599,6 @@ pub const fn saturating_sub(self, rhs: Duration) -> Duration {
|
|||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
||||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_panic))]
|
|
||||||
pub const fn checked_mul(self, rhs: u32) -> Option<Duration> {
|
pub const fn checked_mul(self, rhs: u32) -> Option<Duration> {
|
||||||
// Multiply nanoseconds as u64, because it cannot overflow that way.
|
// Multiply nanoseconds as u64, because it cannot overflow that way.
|
||||||
let total_nanos = self.nanos as u64 * rhs as u64;
|
let total_nanos = self.nanos as u64 * rhs as u64;
|
||||||
@ -660,7 +656,6 @@ pub const fn saturating_mul(self, rhs: u32) -> Duration {
|
|||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
|
||||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_panic))]
|
|
||||||
pub const fn checked_div(self, rhs: u32) -> Option<Duration> {
|
pub const fn checked_div(self, rhs: u32) -> Option<Duration> {
|
||||||
if rhs != 0 {
|
if rhs != 0 {
|
||||||
let secs = self.secs / (rhs as u64);
|
let secs = self.secs / (rhs as u64);
|
||||||
|
@ -58,11 +58,10 @@
|
|||||||
#![feature(const_mut_refs)]
|
#![feature(const_mut_refs)]
|
||||||
#![feature(const_pin)]
|
#![feature(const_pin)]
|
||||||
#![feature(const_slice_from_raw_parts)]
|
#![feature(const_slice_from_raw_parts)]
|
||||||
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
|
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![feature(unwrap_infallible)]
|
#![feature(unwrap_infallible)]
|
||||||
#![feature(result_into_ok_or_err)]
|
#![feature(result_into_ok_or_err)]
|
||||||
#![cfg_attr(not(bootstrap), feature(portable_simd))]
|
#![feature(portable_simd)]
|
||||||
#![feature(ptr_metadata)]
|
#![feature(ptr_metadata)]
|
||||||
#![feature(once_cell)]
|
#![feature(once_cell)]
|
||||||
#![feature(unsized_tuple_coercion)]
|
#![feature(unsized_tuple_coercion)]
|
||||||
@ -108,7 +107,6 @@
|
|||||||
mod pin;
|
mod pin;
|
||||||
mod ptr;
|
mod ptr;
|
||||||
mod result;
|
mod result;
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
mod simd;
|
mod simd;
|
||||||
mod slice;
|
mod slice;
|
||||||
mod str;
|
mod str;
|
||||||
|
@ -264,8 +264,7 @@
|
|||||||
#![feature(const_ipv4)]
|
#![feature(const_ipv4)]
|
||||||
#![feature(const_ipv6)]
|
#![feature(const_ipv6)]
|
||||||
#![feature(const_option)]
|
#![feature(const_option)]
|
||||||
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
|
#![feature(const_mut_refs)]
|
||||||
#![cfg_attr(not(bootstrap), feature(const_mut_refs))]
|
|
||||||
#![feature(const_socketaddr)]
|
#![feature(const_socketaddr)]
|
||||||
#![feature(const_trait_impl)]
|
#![feature(const_trait_impl)]
|
||||||
#![feature(container_error_extra)]
|
#![feature(container_error_extra)]
|
||||||
@ -275,9 +274,7 @@
|
|||||||
#![feature(decl_macro)]
|
#![feature(decl_macro)]
|
||||||
#![feature(doc_cfg)]
|
#![feature(doc_cfg)]
|
||||||
#![feature(doc_cfg_hide)]
|
#![feature(doc_cfg_hide)]
|
||||||
#![cfg_attr(bootstrap, feature(doc_primitive))]
|
#![feature(rustdoc_internals)]
|
||||||
#![cfg_attr(bootstrap, feature(doc_keyword))]
|
|
||||||
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
|
|
||||||
#![feature(doc_masked)]
|
#![feature(doc_masked)]
|
||||||
#![feature(doc_notable_trait)]
|
#![feature(doc_notable_trait)]
|
||||||
#![feature(dropck_eyepatch)]
|
#![feature(dropck_eyepatch)]
|
||||||
@ -323,7 +320,7 @@
|
|||||||
#![feature(panic_internals)]
|
#![feature(panic_internals)]
|
||||||
#![feature(panic_unwind)]
|
#![feature(panic_unwind)]
|
||||||
#![feature(pin_static_ref)]
|
#![feature(pin_static_ref)]
|
||||||
#![cfg_attr(not(bootstrap), feature(portable_simd))]
|
#![feature(portable_simd)]
|
||||||
#![feature(prelude_import)]
|
#![feature(prelude_import)]
|
||||||
#![feature(ptr_internals)]
|
#![feature(ptr_internals)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
@ -476,7 +473,6 @@
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub use core::result;
|
pub use core::result;
|
||||||
#[unstable(feature = "portable_simd", issue = "86656")]
|
#[unstable(feature = "portable_simd", issue = "86656")]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub use core::simd;
|
pub use core::simd;
|
||||||
#[unstable(feature = "async_stream", issue = "79024")]
|
#[unstable(feature = "async_stream", issue = "79024")]
|
||||||
pub use core::stream;
|
pub use core::stream;
|
||||||
|
Loading…
Reference in New Issue
Block a user