mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Add a new debug_assertions intrinsic
This commit is contained in:
parent
580067c76f
commit
55fabf35b1
@ -2569,6 +2569,17 @@ extern "rust-intrinsic" {
|
|||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
#[cfg(not(bootstrap))]
|
#[cfg(not(bootstrap))]
|
||||||
pub fn is_val_statically_known<T: Copy>(arg: T) -> bool;
|
pub fn is_val_statically_known<T: Copy>(arg: T) -> bool;
|
||||||
|
|
||||||
|
#[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")]
|
||||||
|
#[rustc_safe_intrinsic]
|
||||||
|
#[cfg(not(bootstrap))]
|
||||||
|
pub(crate) fn debug_assertions() -> bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(bootstrap)]
|
||||||
|
#[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")]
|
||||||
|
pub(crate) const fn debug_assertions() -> bool {
|
||||||
|
cfg!(debug_assertions)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Seems using `unstable` here completely ignores `rustc_allow_const_fn_unstable`
|
// FIXME: Seems using `unstable` here completely ignores `rustc_allow_const_fn_unstable`
|
||||||
|
Loading…
Reference in New Issue
Block a user