Handle bootstrap cfgs

This commit is contained in:
Boxy Uwu 2025-12-10 05:55:31 +00:00 committed by Josh Stone
parent 93fc203606
commit 2ffb1d55ef
10 changed files with 6 additions and 21 deletions

View file

@ -10,7 +10,6 @@
// tidy-alphabetical-start
#![allow(clippy::mut_from_ref)] // Arena allocators are one place where this pattern is fine.
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(maybe_uninit_slice))]
#![cfg_attr(test, feature(test))]
#![deny(unsafe_op_in_unsafe_fn)]
#![doc(test(no_crate_inject, attr(deny(warnings), allow(internal_features))))]

View file

@ -5,7 +5,6 @@
//! This API is completely unstable and subject to change.
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(slice_as_array))]
#![feature(assert_matches)]
#![feature(extern_types)]
#![feature(file_buffered)]

View file

@ -3,7 +3,6 @@
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/hir.html
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(debug_closure_helpers))]
#![feature(associated_type_defaults)]
#![feature(closure_track_caller)]
#![feature(const_default)]

View file

@ -58,7 +58,6 @@ This API is completely unstable and subject to change.
// tidy-alphabetical-start
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(debug_closure_helpers))]
#![feature(assert_matches)]
#![feature(gen_blocks)]
#![feature(if_let_guard)]

View file

@ -2683,7 +2683,6 @@ declare_lint! {
///
/// ```rust,compile_fail
/// # #![allow(unused)]
/// # #![cfg_attr(bootstrap, deny(deref_nullptr))]
/// use std::ptr;
/// unsafe {
/// let x = &*ptr::null::<i32>();

View file

@ -2346,8 +2346,7 @@ declare_lint! {
/// [sanitize]: https://doc.rust-lang.org/nightly/unstable-book/language-features/no-sanitize.html
/// ### Example
///
#[cfg_attr(bootstrap, doc = "```ignore")]
#[cfg_attr(not(bootstrap), doc = "```rust,no_run")]
/// ```rust,no_run
/// #![feature(sanitize)]
///
/// #[sanitize(realtime = "nonblocking")]
@ -2356,8 +2355,7 @@ declare_lint! {
/// fn main() {
/// x();
/// }
#[cfg_attr(bootstrap, doc = "```")]
#[cfg_attr(not(bootstrap), doc = "```")]
/// ```
///
/// {{produces}}
///
@ -4907,8 +4905,7 @@ declare_lint! {
///
/// ### Example
///
#[cfg_attr(bootstrap, doc = "```ignore")]
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
/// ```rust,compile_fail
/// #![feature(supertrait_item_shadowing)]
/// #![deny(resolving_to_items_shadowing_supertrait_items)]
///
@ -4924,8 +4921,7 @@ declare_lint! {
///
/// struct MyType;
/// MyType.hello();
#[cfg_attr(bootstrap, doc = "```")]
#[cfg_attr(not(bootstrap), doc = "```")]
/// ```
///
/// {{produces}}
///
@ -4951,8 +4947,7 @@ declare_lint! {
///
/// ### Example
///
#[cfg_attr(bootstrap, doc = "```ignore")]
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
/// ```rust,compile_fail"
/// #![feature(supertrait_item_shadowing)]
/// #![deny(shadowing_supertrait_items)]
///
@ -4965,8 +4960,7 @@ declare_lint! {
/// fn hello(&self) {}
/// }
/// impl<T> Downstream for T {}
#[cfg_attr(bootstrap, doc = "```")]
#[cfg_attr(not(bootstrap), doc = "```")]
/// ```
///
/// {{produces}}
///

View file

@ -8,7 +8,6 @@
//! LLVM.
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(debug_closure_helpers))]
#![expect(internal_features)]
#![feature(iter_intersperse)]
#![feature(rustc_attrs)]

View file

@ -22,7 +22,6 @@
#![feature(staged_api)]
#![feature(allow_internal_unstable)]
#![feature(decl_macro)]
#![cfg_attr(bootstrap, feature(maybe_uninit_write_slice))]
#![feature(negative_impls)]
#![feature(panic_can_unwind)]
#![feature(restricted_std)]

View file

@ -1,5 +1,4 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(debug_closure_helpers))]
#![doc(
html_root_url = "https://doc.rust-lang.org/nightly/",
html_playground_url = "https://play.rust-lang.org/"

View file

@ -17,7 +17,6 @@
#![feature(derive_coerce_pointee)]
#![feature(arbitrary_self_types)]
#![feature(iter_advance_by)]
#![cfg_attr(bootstrap, feature(duration_from_nanos_u128))]
// Configure clippy and other lints
#![allow(
clippy::collapsible_else_if,