Bump cfg(bootstrap)
This commit is contained in:
parent
068e3d97d0
commit
0a916062aa
@ -1,5 +1,5 @@
|
||||
#![cfg_attr(feature = "nightly", feature(step_trait, rustc_attrs, min_specialization))]
|
||||
#![cfg_attr(all(not(bootstrap), feature = "nightly"), allow(internal_features))]
|
||||
#![cfg_attr(feature = "nightly", allow(internal_features))]
|
||||
|
||||
use std::fmt;
|
||||
#[cfg(feature = "nightly")]
|
||||
|
@ -24,7 +24,7 @@
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
#![allow(clippy::mut_from_ref)] // Arena allocators are one of the places where this pattern is fine.
|
||||
|
||||
use smallvec::SmallVec;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#![feature(trusted_step)]
|
||||
#![feature(try_blocks)]
|
||||
#![recursion_limit = "256"]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_middle;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#![allow(rustc::potential_query_instability)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -4,7 +4,7 @@
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
@ -15,7 +15,7 @@
|
||||
#![feature(box_patterns)]
|
||||
#![feature(error_reporter)]
|
||||
#![allow(incomplete_features)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_macros;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#![feature(try_blocks)]
|
||||
#![recursion_limit = "256"]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_macros;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#![recursion_limit = "256"]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_macros;
|
||||
|
@ -12,7 +12,7 @@
|
||||
test
|
||||
)
|
||||
)]
|
||||
#![cfg_attr(all(not(bootstrap), feature = "nightly"), allow(internal_features))]
|
||||
#![cfg_attr(feature = "nightly", allow(internal_features))]
|
||||
|
||||
#[cfg(feature = "nightly")]
|
||||
pub mod bit_set;
|
||||
|
@ -40,7 +40,7 @@
|
||||
#![recursion_limit = "256"]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_middle;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#![allow(rustc::default_hash_types)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
#![recursion_limit = "128"]
|
||||
|
||||
use synstructure::decl_derive;
|
||||
|
@ -63,7 +63,7 @@
|
||||
#![feature(macro_metavar_expr)]
|
||||
#![recursion_limit = "512"]
|
||||
#![allow(rustc::potential_query_instability)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#![feature(never_type)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![recursion_limit = "256"]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#![allow(rustc::potential_query_instability, unused_parens)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_middle;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#![recursion_limit = "256"]
|
||||
#![allow(rustdoc::private_intra_doc_links)]
|
||||
#![allow(rustc::potential_query_instability)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#![allow(rustc::potential_query_instability)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_macros;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#![feature(round_char_boundary)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_macros;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#![feature(step_trait)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#![feature(unwrap_infallible)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
|
@ -88,8 +88,8 @@
|
||||
#![warn(missing_docs)]
|
||||
#![allow(explicit_outlives_requirements)]
|
||||
#![warn(multiple_supertrait_upcastable)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
|
||||
#![allow(internal_features)]
|
||||
#![allow(rustdoc::redundant_explicit_links)]
|
||||
//
|
||||
// Library features:
|
||||
// tidy-alphabetical-start
|
||||
|
@ -2499,7 +2499,6 @@ fn test_into_flattened_size_overflow() {
|
||||
let _ = v.into_flattened();
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[test]
|
||||
fn test_box_zero_allocator() {
|
||||
use core::{alloc::AllocError, cell::RefCell};
|
||||
|
@ -1893,8 +1893,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
/// on an _exclusive_ `UnsafeCell<T>`. Even though `T` and `UnsafeCell<T>` have the
|
||||
/// same memory layout, the following is not allowed and undefined behavior:
|
||||
///
|
||||
#[cfg_attr(bootstrap, doc = "```rust,no_run")]
|
||||
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
|
||||
/// ```rust,compile_fail
|
||||
/// # use std::cell::UnsafeCell;
|
||||
/// unsafe fn not_allowed<T>(ptr: &UnsafeCell<T>) -> &mut T {
|
||||
/// let t = ptr as *const UnsafeCell<T> as *mut T;
|
||||
|
@ -2399,7 +2399,6 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
|
||||
/// that differs. That allows optimizations that can read in large chunks.
|
||||
///
|
||||
/// [valid]: crate::ptr#safety
|
||||
#[cfg(not(bootstrap))]
|
||||
#[rustc_const_unstable(feature = "const_intrinsic_compare_bytes", issue = "none")]
|
||||
#[rustc_nounwind]
|
||||
pub fn compare_bytes(left: *const u8, right: *const u8, bytes: usize) -> i32;
|
||||
@ -2844,18 +2843,3 @@ pub(crate) fn is_nonoverlapping<T>(src: *const T, dst: *const T, count: usize) -
|
||||
write_bytes(dst, val, count)
|
||||
}
|
||||
}
|
||||
|
||||
/// Backfill for bootstrap
|
||||
#[cfg(bootstrap)]
|
||||
pub unsafe fn compare_bytes(left: *const u8, right: *const u8, bytes: usize) -> i32 {
|
||||
extern "C" {
|
||||
fn memcmp(s1: *const u8, s2: *const u8, n: usize) -> crate::ffi::c_int;
|
||||
}
|
||||
|
||||
if bytes != 0 {
|
||||
// SAFETY: Since bytes is non-zero, the caller has met `memcmp`'s requirements.
|
||||
unsafe { memcmp(left, right, bytes).into() }
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
//!
|
||||
//! ```rust
|
||||
//! #![feature(core_intrinsics, custom_mir)]
|
||||
#![cfg_attr(not(bootstrap), doc = "#![allow(internal_features)]")]
|
||||
//! #![allow(internal_features)]
|
||||
//!
|
||||
//! use core::intrinsics::mir::*;
|
||||
//!
|
||||
@ -64,7 +64,7 @@
|
||||
//!
|
||||
//! ```rust
|
||||
//! #![feature(core_intrinsics, custom_mir)]
|
||||
#![cfg_attr(not(bootstrap), doc = "#![allow(internal_features)]")]
|
||||
//! #![allow(internal_features)]
|
||||
//!
|
||||
//! use core::intrinsics::mir::*;
|
||||
//!
|
||||
@ -318,7 +318,7 @@ fn Discriminant<T>(place: T) -> <T as ::core::marker::DiscriminantKind>::Discrim
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
#[cfg_attr(not(bootstrap), doc = "#![allow(internal_features)]")]
|
||||
/// #![allow(internal_features)]
|
||||
/// #![feature(custom_mir, core_intrinsics)]
|
||||
///
|
||||
/// use core::intrinsics::mir::*;
|
||||
|
@ -96,9 +96,9 @@
|
||||
#![allow(explicit_outlives_requirements)]
|
||||
#![allow(incomplete_features)]
|
||||
#![warn(multiple_supertrait_upcastable)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
// Do not check link redundancy on bootstraping phase
|
||||
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
|
||||
#![allow(rustdoc::redundant_explicit_links)]
|
||||
//
|
||||
// Library features:
|
||||
// tidy-alphabetical-start
|
||||
|
@ -14,7 +14,7 @@
|
||||
#![feature(staged_api)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(c_unwind)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
mod android;
|
||||
|
@ -19,14 +19,13 @@
|
||||
#![feature(panic_unwind)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(std_internals)]
|
||||
#![cfg_attr(bootstrap, feature(abi_thiscall))]
|
||||
#![feature(rustc_attrs)]
|
||||
#![panic_runtime]
|
||||
#![feature(panic_runtime)]
|
||||
#![feature(c_unwind)]
|
||||
// `real_imp` is unused with Miri, so silence warnings.
|
||||
#![cfg_attr(miri, allow(dead_code))]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
use alloc::boxed::Box;
|
||||
use core::any::Any;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#![feature(min_specialization)]
|
||||
#![feature(strict_provenance)]
|
||||
#![recursion_limit = "256"]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[unstable(feature = "proc_macro_internals", issue = "27812")]
|
||||
#[doc(hidden)]
|
||||
|
@ -7,5 +7,5 @@
|
||||
issue = "none"
|
||||
)]
|
||||
#![allow(unused_features)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
#![feature(staged_api)]
|
||||
|
@ -220,10 +220,10 @@
|
||||
#![warn(missing_debug_implementations)]
|
||||
#![allow(explicit_outlives_requirements)]
|
||||
#![allow(unused_lifetimes)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
#![deny(rustc::existing_doc_keyword)]
|
||||
#![deny(fuzzy_provenance_casts)]
|
||||
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
|
||||
#![allow(rustdoc::redundant_explicit_links)]
|
||||
// Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind`
|
||||
#![deny(ffi_unwind_calls)]
|
||||
// std may use features in a platform-specific way
|
||||
|
@ -21,7 +21,7 @@
|
||||
#![feature(process_exitcode_internals)]
|
||||
#![feature(panic_can_unwind)]
|
||||
#![feature(test)]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
// Public reexports
|
||||
pub use self::bench::{black_box, Bencher};
|
||||
|
@ -5,7 +5,7 @@
|
||||
#![feature(c_unwind)]
|
||||
#![feature(cfg_target_abi)]
|
||||
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
|
||||
#![cfg_attr(not(bootstrap), allow(internal_features))]
|
||||
#![allow(internal_features)]
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_env = "msvc")] {
|
||||
|
@ -2354,14 +2354,7 @@ fn make_compile_args(
|
||||
// Hide line numbers to reduce churn
|
||||
rustc.arg("-Zui-testing");
|
||||
rustc.arg("-Zdeduplicate-diagnostics=no");
|
||||
// #[cfg(not(bootstrap)] unconditionally pass flag after beta bump
|
||||
// since `ui-fulldeps --stage=1` builds using the stage 0 compiler,
|
||||
// which doesn't have this flag.
|
||||
if !(self.config.stage_id.starts_with("stage1-")
|
||||
&& self.config.suite == "ui-fulldeps")
|
||||
{
|
||||
rustc.arg("-Zwrite-long-types-to-disk=no");
|
||||
}
|
||||
rustc.arg("-Zwrite-long-types-to-disk=no");
|
||||
// FIXME: use this for other modes too, for perf?
|
||||
rustc.arg("-Cstrip=debuginfo");
|
||||
}
|
||||
@ -2483,13 +2476,8 @@ fn make_compile_args(
|
||||
rustc.args(&["-A", "unused"]);
|
||||
}
|
||||
|
||||
// #[cfg(not(bootstrap)] unconditionally pass flag after beta bump
|
||||
// since `ui-fulldeps --stage=1` builds using the stage 0 compiler,
|
||||
// which doesn't have this lint.
|
||||
if !(self.config.stage_id.starts_with("stage1-") && self.config.suite == "ui-fulldeps") {
|
||||
// Allow tests to use internal features.
|
||||
rustc.args(&["-A", "internal_features"]);
|
||||
}
|
||||
// Allow tests to use internal features.
|
||||
rustc.args(&["-A", "internal_features"]);
|
||||
|
||||
if self.props.force_host {
|
||||
self.maybe_add_external_args(&mut rustc, &self.config.host_rustcflags);
|
||||
|
Loading…
Reference in New Issue
Block a user