Apply cfg-bootstrap switch

This commit is contained in:
Mark Rousskov 2021-11-30 10:50:44 -05:00
parent e9bc25dc34
commit b221c877e8
16 changed files with 9 additions and 38 deletions

View File

@ -3,7 +3,6 @@
#![feature(bool_to_option)]
#![feature(box_patterns)]
#![feature(crate_visibility_modifier)]
#![cfg_attr(bootstrap, feature(format_args_capture))]
#![feature(in_band_lifetimes)]
#![feature(iter_zip)]
#![feature(let_else)]

View File

@ -6,7 +6,6 @@
#![feature(crate_visibility_modifier)]
#![feature(backtrace)]
#![feature(if_let_guard)]
#![cfg_attr(bootstrap, feature(format_args_capture))]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(nll)]

View File

@ -1,7 +1,6 @@
#![feature(crate_visibility_modifier)]
#![feature(decl_macro)]
#![feature(destructuring_assignment)]
#![cfg_attr(bootstrap, feature(format_args_capture))]
#![feature(if_let_guard)]
#![feature(iter_zip)]
#![feature(let_else)]

View File

@ -30,7 +30,6 @@
#![feature(bool_to_option)]
#![feature(box_patterns)]
#![feature(crate_visibility_modifier)]
#![cfg_attr(bootstrap, feature(format_args_capture))]
#![feature(iter_order_by)]
#![feature(iter_zip)]
#![feature(never_type)]

View File

@ -7,7 +7,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(crate_visibility_modifier)]
#![feature(in_band_lifetimes)]
#![cfg_attr(bootstrap, feature(format_args_capture))]
#![feature(iter_zip)]
#![feature(map_try_insert)]
#![feature(min_specialization)]

View File

@ -13,7 +13,6 @@
#![feature(drain_filter)]
#![feature(bool_to_option)]
#![feature(crate_visibility_modifier)]
#![cfg_attr(bootstrap, feature(format_args_capture))]
#![feature(iter_zip)]
#![feature(let_else)]
#![feature(never_type)]

View File

@ -58,7 +58,6 @@ This API is completely unstable and subject to change.
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(bool_to_option)]
#![feature(crate_visibility_modifier)]
#![cfg_attr(bootstrap, feature(format_args_capture))]
#![feature(if_let_guard)]
#![feature(in_band_lifetimes)]
#![feature(is_sorted)]

View File

@ -105,7 +105,6 @@
#![feature(fmt_internals)]
#![feature(fn_traits)]
#![feature(inherent_ascii_escape)]
#![cfg_attr(bootstrap, feature(format_args_capture))]
#![feature(inplace_iteration)]
#![feature(iter_advance_by)]
#![feature(iter_zip)]

View File

@ -330,11 +330,9 @@ impl<T: Ord, const N: usize> Ord for [T; N] {
}
}
#[cfg(not(bootstrap))]
#[stable(feature = "copy_clone_array_lib", since = "1.58.0")]
impl<T: Copy, const N: usize> Copy for [T; N] {}
#[cfg(not(bootstrap))]
#[stable(feature = "copy_clone_array_lib", since = "1.58.0")]
impl<T: Clone, const N: usize> Clone for [T; N] {
#[inline]
@ -348,12 +346,10 @@ impl<T: Clone, const N: usize> Clone for [T; N] {
}
}
#[cfg(not(bootstrap))]
trait SpecArrayClone: Clone {
fn clone<const N: usize>(array: &[Self; N]) -> [Self; N];
}
#[cfg(not(bootstrap))]
impl<T: Clone> SpecArrayClone for T {
#[inline]
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 {
#[inline]
fn clone<const N: usize>(array: &[T; N]) -> [T; N] {

View File

@ -159,14 +159,12 @@
#![feature(const_impl_trait)]
#![feature(const_mut_refs)]
#![feature(const_precise_live_drops)]
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
#![feature(const_refs_to_cell)]
#![feature(decl_macro)]
#![feature(derive_default_enum)]
#![feature(doc_cfg)]
#![feature(doc_notable_trait)]
#![cfg_attr(bootstrap, feature(doc_primitive))]
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
#![feature(rustdoc_internals)]
#![feature(exhaustive_patterns)]
#![feature(doc_cfg_hide)]
#![feature(extern_types)]
@ -198,7 +196,7 @@
#![feature(try_blocks)]
#![feature(unboxed_closures)]
#![feature(unsized_fn_params)]
#![cfg_attr(not(bootstrap), feature(asm_const))]
#![feature(asm_const)]
//
// Target features:
#![feature(aarch64_target_feature)]
@ -408,13 +406,11 @@ pub mod arch {
#[allow(rustdoc::bare_urls)]
#[unstable(feature = "portable_simd", issue = "86656")]
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
#[cfg(not(bootstrap))]
mod core_simd;
#[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
#[unstable(feature = "portable_simd", issue = "86656")]
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
#[cfg(not(bootstrap))]
pub mod simd {
#[unstable(feature = "portable_simd", issue = "86656")]
pub use crate::core_simd::simd::*;

View File

@ -789,7 +789,6 @@ impl<T> MaybeUninit<T> {
/// ```
#[stable(feature = "maybe_uninit_ref", since = "1.55.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)]
pub const unsafe fn assume_init_ref(&self) -> &T {
// SAFETY: the caller must guarantee that `self` is initialized.

View File

@ -82,7 +82,7 @@ pub trait Generator<R = ()> {
/// `return` statement or implicitly as the last expression of a generator
/// literal. For example futures would use this as `Result<T, E>` as it
/// represents a completed future.
#[cfg_attr(not(bootstrap), lang = "generator_return")]
#[lang = "generator_return"]
type Return;
/// Resumes the execution of this generator.

View File

@ -131,7 +131,7 @@ pub const unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a m
}
// 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")]
#[rustc_const_unstable(feature = "const_slice_from_raw_parts", issue = "67456")]
const fn debug_check_data_len<T>(data: *const T, len: usize) {
@ -161,7 +161,7 @@ const fn debug_check_data_len<T>(data: *const T, len: usize) {
);
}
#[cfg(not(all(not(bootstrap), debug_assertions)))]
#[cfg(not(debug_assertions))]
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).

View File

@ -182,7 +182,6 @@ impl Duration {
#[inline]
#[must_use]
#[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 {
let secs = match secs.checked_add((nanos / NANOS_PER_SEC) as u64) {
Some(secs) => secs,
@ -482,7 +481,6 @@ impl Duration {
without modifying the original"]
#[inline]
#[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> {
if let Some(mut secs) = self.secs.checked_add(rhs.secs) {
let mut nanos = self.nanos + rhs.nanos;
@ -543,7 +541,6 @@ impl Duration {
without modifying the original"]
#[inline]
#[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> {
if let Some(mut secs) = self.secs.checked_sub(rhs.secs) {
let nanos = if self.nanos >= rhs.nanos {
@ -602,7 +599,6 @@ impl Duration {
without modifying the original"]
#[inline]
#[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> {
// Multiply nanoseconds as u64, because it cannot overflow that way.
let total_nanos = self.nanos as u64 * rhs as u64;
@ -660,7 +656,6 @@ impl Duration {
without modifying the original"]
#[inline]
#[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> {
if rhs != 0 {
let secs = self.secs / (rhs as u64);

View File

@ -58,11 +58,10 @@
#![feature(const_mut_refs)]
#![feature(const_pin)]
#![feature(const_slice_from_raw_parts)]
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
#![feature(never_type)]
#![feature(unwrap_infallible)]
#![feature(result_into_ok_or_err)]
#![cfg_attr(not(bootstrap), feature(portable_simd))]
#![feature(portable_simd)]
#![feature(ptr_metadata)]
#![feature(once_cell)]
#![feature(unsized_tuple_coercion)]
@ -108,7 +107,6 @@ mod pattern;
mod pin;
mod ptr;
mod result;
#[cfg(not(bootstrap))]
mod simd;
mod slice;
mod str;

View File

@ -264,8 +264,7 @@
#![feature(const_ipv4)]
#![feature(const_ipv6)]
#![feature(const_option)]
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
#![cfg_attr(not(bootstrap), feature(const_mut_refs))]
#![feature(const_mut_refs)]
#![feature(const_socketaddr)]
#![feature(const_trait_impl)]
#![feature(container_error_extra)]
@ -275,9 +274,7 @@
#![feature(decl_macro)]
#![feature(doc_cfg)]
#![feature(doc_cfg_hide)]
#![cfg_attr(bootstrap, feature(doc_primitive))]
#![cfg_attr(bootstrap, feature(doc_keyword))]
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
#![feature(rustdoc_internals)]
#![feature(doc_masked)]
#![feature(doc_notable_trait)]
#![feature(dropck_eyepatch)]
@ -323,7 +320,7 @@
#![feature(panic_internals)]
#![feature(panic_unwind)]
#![feature(pin_static_ref)]
#![cfg_attr(not(bootstrap), feature(portable_simd))]
#![feature(portable_simd)]
#![feature(prelude_import)]
#![feature(ptr_internals)]
#![feature(rustc_attrs)]
@ -476,7 +473,6 @@ pub use core::ptr;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::result;
#[unstable(feature = "portable_simd", issue = "86656")]
#[cfg(not(bootstrap))]
pub use core::simd;
#[unstable(feature = "async_stream", issue = "79024")]
pub use core::stream;