From 0b0de92158ade8f3b7f54d327a834f5caf85179c Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Wed, 14 Feb 2024 21:53:03 +0100 Subject: [PATCH] Inline cfg(bootstrap) version of `debug_assertions` intrinsic This speeds up the stage1 build of the library by about 10s on my computer. --- library/core/src/intrinsics.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index c8259c0024c75..1b82ba8952706 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2589,6 +2589,7 @@ extern "rust-intrinsic" { } #[cfg(bootstrap)] +#[inline(always)] #[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")] pub(crate) const fn debug_assertions() -> bool { cfg!(debug_assertions)