update cfgs

This commit is contained in:
Boxy
2025-04-02 21:28:54 +01:00
parent 609eacbb22
commit c93005ee65
24 changed files with 29 additions and 140 deletions

View File

@@ -348,7 +348,7 @@ fn default_alloc_error_hook(layout: Layout) {
unsafe extern "Rust" {
// This symbol is emitted by rustc next to __rust_alloc_error_handler.
// Its value depends on the -Zoom={panic,abort} compiler option.
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
static __rust_alloc_error_handler_should_panic: u8;
}

View File

@@ -432,7 +432,7 @@ mod helper {
use super::*;
pub(super) type LazyResolve = impl (FnOnce() -> Capture) + Send + Sync + UnwindSafe;
#[cfg_attr(not(bootstrap), define_opaque(LazyResolve))]
#[define_opaque(LazyResolve)]
pub(super) fn lazy_resolve(mut capture: Capture) -> LazyResolve {
move || {
// Use the global backtrace lock to synchronize this as it's a

View File

@@ -55,14 +55,14 @@ pub static EMPTY_PANIC: fn(&'static str) -> ! =
// hook up these functions, but it is not this day!
#[allow(improper_ctypes)]
unsafe extern "C" {
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
fn __rust_panic_cleanup(payload: *mut u8) -> *mut (dyn Any + Send + 'static);
}
unsafe extern "Rust" {
/// `PanicPayload` lazily performs allocation only when needed (this avoids
/// allocations when using the "abort" panic runtime).
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
fn __rust_start_panic(payload: &mut dyn PanicPayload) -> u32;
}

View File

@@ -109,7 +109,6 @@ pub use core::prelude::v1::deref;
issue = "63063",
reason = "`type_alias_impl_trait` has open design concerns"
)]
#[cfg(not(bootstrap))]
pub use core::prelude::v1::define_opaque;
// The file so far is equivalent to core/src/prelude/v1.rs. It is duplicated