apply bootstrap cfgs
This commit is contained in:
parent
6c50ae898b
commit
647d9b525f
@ -159,13 +159,7 @@ fn copy_self_contained_objects(
|
||||
compiler: &Compiler,
|
||||
target: Interned<String>,
|
||||
) -> Vec<(PathBuf, DependencyType)> {
|
||||
// cfg(bootstrap)
|
||||
// Remove when upgrading bootstrap compiler.
|
||||
let libdir_self_contained = if compiler.stage == 0 {
|
||||
builder.sysroot_libdir(*compiler, target).to_path_buf()
|
||||
} else {
|
||||
builder.sysroot_libdir(*compiler, target).join("self-contained")
|
||||
};
|
||||
let libdir_self_contained = builder.sysroot_libdir(*compiler, target).join("self-contained");
|
||||
t!(fs::create_dir_all(&libdir_self_contained));
|
||||
let mut target_deps = vec![];
|
||||
|
||||
|
@ -87,7 +87,6 @@
|
||||
#![feature(const_generic_impls_guard)]
|
||||
#![feature(const_generics)]
|
||||
#![feature(const_in_array_repeat_expressions)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(cow_is_borrowed)]
|
||||
#![feature(deque_range)]
|
||||
#![feature(dispatch_from_dyn)]
|
||||
|
@ -1927,7 +1927,6 @@ extern "rust-intrinsic" {
|
||||
/// The to-be-stabilized version of this intrinsic is
|
||||
/// [`std::mem::variant_count`](../../std/mem/fn.variant_count.html)
|
||||
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub fn variant_count<T>() -> usize;
|
||||
|
||||
/// Rust's "try catch" construct which invokes the function pointer `try_fn`
|
||||
@ -1958,7 +1957,6 @@ extern "rust-intrinsic" {
|
||||
/// Internal placeholder for injecting code coverage counters when the "instrument-coverage"
|
||||
/// option is enabled. The placeholder is replaced with `llvm.instrprof.increment` during code
|
||||
/// generation.
|
||||
#[cfg(not(bootstrap))]
|
||||
#[lang = "count_code_region"]
|
||||
pub fn count_code_region(index: u32, start_byte_pos: u32, end_byte_pos: u32);
|
||||
|
||||
@ -1968,7 +1966,6 @@ extern "rust-intrinsic" {
|
||||
/// "coverage map", which is injected into the generated code, as additional data.
|
||||
/// This marker identifies a code region and two other counters or counter expressions
|
||||
/// whose sum is the number of times the code region was executed.
|
||||
#[cfg(not(bootstrap))]
|
||||
pub fn coverage_counter_add(
|
||||
index: u32,
|
||||
left_index: u32,
|
||||
@ -1980,7 +1977,6 @@ extern "rust-intrinsic" {
|
||||
/// This marker identifies a code region and two other counters or counter expressions
|
||||
/// whose difference is the number of times the code region was executed.
|
||||
/// (See `coverage_counter_add` for more information.)
|
||||
#[cfg(not(bootstrap))]
|
||||
pub fn coverage_counter_subtract(
|
||||
index: u32,
|
||||
left_index: u32,
|
||||
@ -1992,17 +1988,14 @@ extern "rust-intrinsic" {
|
||||
/// This marker identifies a code region to be added to the "coverage map" to indicate source
|
||||
/// code that can never be reached.
|
||||
/// (See `coverage_counter_add` for more information.)
|
||||
#[cfg(not(bootstrap))]
|
||||
pub fn coverage_unreachable(start_byte_pos: u32, end_byte_pos: u32);
|
||||
|
||||
/// See documentation of `<*const T>::guaranteed_eq` for details.
|
||||
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub fn ptr_guaranteed_eq<T>(ptr: *const T, other: *const T) -> bool;
|
||||
|
||||
/// See documentation of `<*const T>::guaranteed_ne` for details.
|
||||
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub fn ptr_guaranteed_ne<T>(ptr: *const T, other: *const T) -> bool;
|
||||
}
|
||||
|
||||
|
@ -73,8 +73,6 @@
|
||||
#![feature(const_ascii_ctype_on_intrinsics)]
|
||||
#![feature(const_alloc_layout)]
|
||||
#![feature(const_discriminant)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![cfg_attr(bootstrap, feature(const_loop))]
|
||||
#![feature(const_checked_int_methods)]
|
||||
#![feature(const_euclidean_int_methods)]
|
||||
#![feature(const_overflowing_int_methods)]
|
||||
@ -87,7 +85,7 @@
|
||||
#![feature(const_generics)]
|
||||
#![feature(const_ptr_offset)]
|
||||
#![feature(const_ptr_offset_from)]
|
||||
#![cfg_attr(not(bootstrap), feature(const_raw_ptr_comparison))]
|
||||
#![feature(const_raw_ptr_comparison)]
|
||||
#![feature(const_result)]
|
||||
#![feature(const_slice_from_raw_parts)]
|
||||
#![feature(const_slice_ptr_len)]
|
||||
@ -120,13 +118,12 @@
|
||||
#![feature(staged_api)]
|
||||
#![feature(std_internals)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
#![feature(transparent_unions)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(unsized_locals)]
|
||||
#![feature(untagged_unions)]
|
||||
#![feature(unwind_attributes)]
|
||||
#![cfg_attr(not(bootstrap), feature(variant_count))]
|
||||
#![feature(variant_count)]
|
||||
#![feature(doc_alias)]
|
||||
#![feature(mmx_target_feature)]
|
||||
#![feature(tbm_target_feature)]
|
||||
@ -141,7 +138,7 @@
|
||||
#![feature(rtm_target_feature)]
|
||||
#![feature(f16c_target_feature)]
|
||||
#![feature(hexagon_target_feature)]
|
||||
#![cfg_attr(not(bootstrap), feature(const_fn_transmute))]
|
||||
#![feature(const_fn_transmute)]
|
||||
#![feature(abi_unadjusted)]
|
||||
#![feature(adx_target_feature)]
|
||||
#![feature(maybe_uninit_slice)]
|
||||
@ -292,7 +289,7 @@ pub mod primitive;
|
||||
)]
|
||||
// FIXME: This annotation should be moved into rust-lang/stdarch after clashing_extern_declarations is
|
||||
// merged. It currently cannot because bootstrap fails as the lint hasn't been defined yet.
|
||||
#[cfg_attr(not(bootstrap), allow(clashing_extern_declarations))]
|
||||
#[allow(clashing_extern_declarations)]
|
||||
#[unstable(feature = "stdsimd", issue = "48556")]
|
||||
mod core_arch;
|
||||
|
||||
|
@ -1037,7 +1037,6 @@ pub const fn discriminant<T>(v: &T) -> Discriminant<T> {
|
||||
/// assert_eq!(mem::variant_count::<Result<!, !>>(), 2);
|
||||
/// ```
|
||||
#[inline(always)]
|
||||
#[cfg(not(bootstrap))]
|
||||
#[unstable(feature = "variant_count", issue = "73662")]
|
||||
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
|
||||
pub const fn variant_count<T>() -> usize {
|
||||
|
@ -21,14 +21,6 @@ macro_rules! try_opt {
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
macro_rules! unlikely {
|
||||
($e: expr) => {
|
||||
$e
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[allow_internal_unstable(const_likely)]
|
||||
macro_rules! unlikely {
|
||||
($e: expr) => {
|
||||
@ -1600,7 +1592,6 @@ $EndFeature, "
|
||||
#[stable(feature = "no_panic_abs", since = "1.13.0")]
|
||||
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
|
||||
#[allow(unused_attributes)]
|
||||
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
|
||||
#[inline]
|
||||
pub const fn wrapping_abs(self) -> Self {
|
||||
if self.is_negative() {
|
||||
@ -1889,7 +1880,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_neg(), (", stringify!($Self
|
||||
#[stable(feature = "wrapping", since = "1.7.0")]
|
||||
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
|
||||
#[allow(unused_attributes)]
|
||||
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
|
||||
pub const fn overflowing_neg(self) -> (Self, bool) {
|
||||
if unlikely!(self == Self::MIN) {
|
||||
(Self::MIN, true)
|
||||
@ -2182,7 +2172,6 @@ $EndFeature, "
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
|
||||
#[allow(unused_attributes)]
|
||||
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
|
||||
#[inline]
|
||||
#[rustc_inherit_overflow_checks]
|
||||
pub const fn abs(self) -> Self {
|
||||
|
@ -224,7 +224,7 @@ pub trait FnMut<Args>: FnOnce<Args> {
|
||||
#[must_use = "closures are lazy and do nothing unless called"]
|
||||
pub trait FnOnce<Args> {
|
||||
/// The returned type after the call operator is used.
|
||||
#[cfg_attr(not(bootstrap), lang = "fn_once_output")]
|
||||
#[lang = "fn_once_output"]
|
||||
#[stable(feature = "fn_once_output", since = "1.12.0")]
|
||||
type Output;
|
||||
|
||||
|
@ -324,7 +324,6 @@ impl<T: ?Sized> *const T {
|
||||
#[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[inline]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub const fn guaranteed_eq(self, other: *const T) -> bool
|
||||
where
|
||||
T: Sized,
|
||||
@ -356,7 +355,6 @@ impl<T: ?Sized> *const T {
|
||||
#[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[inline]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub const fn guaranteed_ne(self, other: *const T) -> bool
|
||||
where
|
||||
T: Sized,
|
||||
|
@ -305,7 +305,6 @@ impl<T: ?Sized> *mut T {
|
||||
#[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[inline]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub const fn guaranteed_eq(self, other: *mut T) -> bool
|
||||
where
|
||||
T: Sized,
|
||||
@ -337,7 +336,6 @@ impl<T: ?Sized> *mut T {
|
||||
#[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
|
||||
#[inline]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub const unsafe fn guaranteed_ne(self, other: *mut T) -> bool
|
||||
where
|
||||
T: Sized,
|
||||
|
@ -6233,14 +6233,8 @@ where
|
||||
return false;
|
||||
}
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
if self.as_ptr() == other.as_ptr() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// While performance would suffer if `guaranteed_eq` just returned `false`
|
||||
// for all arguments, correctness and return value of this function are not affected.
|
||||
#[cfg(not(bootstrap))]
|
||||
if self.as_ptr().guaranteed_eq(other.as_ptr()) {
|
||||
return true;
|
||||
}
|
||||
@ -6259,14 +6253,8 @@ where
|
||||
return false;
|
||||
}
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
if self.as_ptr() == other.as_ptr() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// While performance would suffer if `guaranteed_eq` just returned `false`
|
||||
// for all arguments, correctness and return value of this function are not affected.
|
||||
#[cfg(not(bootstrap))]
|
||||
if self.as_ptr().guaranteed_eq(other.as_ptr()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
use core::any::Any;
|
||||
|
||||
#[rustc_std_internal_symbol]
|
||||
#[cfg_attr(not(bootstrap), allow(improper_ctypes_definitions))]
|
||||
#[allow(improper_ctypes_definitions)]
|
||||
pub unsafe extern "C" fn __rust_panic_cleanup(_: *mut u8) -> *mut (dyn Any + Send + 'static) {
|
||||
unreachable!()
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ extern "C" {
|
||||
mod dwarf;
|
||||
|
||||
#[rustc_std_internal_symbol]
|
||||
#[cfg_attr(not(bootstrap), allow(improper_ctypes_definitions))]
|
||||
#[allow(improper_ctypes_definitions)]
|
||||
pub unsafe extern "C" fn __rust_panic_cleanup(payload: *mut u8) -> *mut (dyn Any + Send + 'static) {
|
||||
Box::into_raw(imp::cleanup(payload))
|
||||
}
|
||||
|
@ -7,10 +7,9 @@
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_syntax)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_fn)] // For the `transmute` in `P::new`
|
||||
#![feature(const_panic)]
|
||||
#![cfg_attr(not(bootstrap), feature(const_fn_transmute))]
|
||||
#![feature(const_fn_transmute)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(label_break_value)]
|
||||
#![feature(nll)]
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(nll)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -5,7 +5,6 @@
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(nll)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
|
||||
pub use emitter::ColorConfig;
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/hir.html
|
||||
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_fn)] // For the unsizing cast on `&[]`
|
||||
#![feature(const_panic)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(allow_internal_unstable)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_fn)]
|
||||
#![feature(const_panic)]
|
||||
#![feature(extend_one)]
|
||||
|
@ -17,7 +17,6 @@
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(const_fn)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_panic)]
|
||||
#![feature(extend_one)]
|
||||
#![feature(never_type)]
|
||||
|
@ -34,7 +34,6 @@
|
||||
#![feature(never_type)]
|
||||
#![feature(nll)]
|
||||
#![feature(or_patterns)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -15,7 +15,7 @@ pub struct RustString {
|
||||
|
||||
/// Appending to a Rust string -- used by RawRustStringOstream.
|
||||
#[no_mangle]
|
||||
#[cfg_attr(not(bootstrap), allow(improper_ctypes_definitions))]
|
||||
#[allow(improper_ctypes_definitions)]
|
||||
pub unsafe extern "C" fn LLVMRustStringWriteImpl(
|
||||
sr: &RustString,
|
||||
ptr: *const c_char,
|
||||
|
@ -27,10 +27,9 @@
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_fn)]
|
||||
#![feature(const_panic)]
|
||||
#![cfg_attr(not(bootstrap), feature(const_fn_transmute))]
|
||||
#![feature(const_fn_transmute)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(discriminant_kind)]
|
||||
#![feature(drain_filter)]
|
||||
@ -42,7 +41,6 @@
|
||||
#![feature(or_patterns)]
|
||||
#![feature(range_is_empty)]
|
||||
#![feature(min_specialization)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
#![feature(trusted_len)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(test)]
|
||||
|
@ -10,8 +10,6 @@ Rust MIR: a lowered representation of Rust.
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(const_fn)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![cfg_attr(bootstrap, feature(const_loop))]
|
||||
#![feature(const_panic)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(decl_macro)]
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_fn)]
|
||||
#![feature(const_panic)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
|
@ -8,7 +8,6 @@
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![feature(or_patterns)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -2,7 +2,6 @@
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![feature(or_patterns)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
use rustc_attr as attr;
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(const_fn)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_panic)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(hash_raw_entry)]
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(nll)]
|
||||
#![feature(or_patterns)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
mod dump_visitor;
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_fn)]
|
||||
#![feature(const_panic)]
|
||||
#![feature(negative_impls)]
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(bool_to_option)]
|
||||
#![cfg_attr(bootstrap, feature(const_if_match))]
|
||||
#![feature(const_fn)]
|
||||
#![feature(const_panic)]
|
||||
#![feature(nll)]
|
||||
|
@ -318,7 +318,6 @@
|
||||
#![feature(toowned_clone_into)]
|
||||
#![feature(total_cmp)]
|
||||
#![feature(trace_macros)]
|
||||
#![cfg_attr(bootstrap, feature(track_caller))]
|
||||
#![feature(try_reserve)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(unsafe_block_in_unsafe_fn)]
|
||||
|
@ -208,7 +208,7 @@ mod imp {
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
extern "C" {
|
||||
fn objc_msgSend(obj: NsId, sel: Sel) -> NsId;
|
||||
#[cfg_attr(not(bootstrap), allow(clashing_extern_declarations))]
|
||||
#[allow(clashing_extern_declarations)]
|
||||
#[link_name = "objc_msgSend"]
|
||||
fn objc_msgSend_ul(obj: NsId, sel: Sel, i: libc::c_ulong) -> NsId;
|
||||
}
|
||||
@ -216,7 +216,7 @@ mod imp {
|
||||
#[cfg(not(target_arch = "aarch64"))]
|
||||
extern "C" {
|
||||
fn objc_msgSend(obj: NsId, sel: Sel, ...) -> NsId;
|
||||
#[cfg_attr(not(bootstrap), allow(clashing_extern_declarations))]
|
||||
#[allow(clashing_extern_declarations)]
|
||||
#[link_name = "objc_msgSend"]
|
||||
fn objc_msgSend_ul(obj: NsId, sel: Sel, ...) -> NsId;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user