Put checks that detect UB under their own flag below debug_assertions
This commit is contained in:
parent
83d0a940c6
commit
a7912cb421
42 changed files with 206 additions and 64 deletions
|
@ -25,6 +25,7 @@ pub type GatedCfg = (Symbol, Symbol, GateFn);
|
|||
const GATED_CFGS: &[GatedCfg] = &[
|
||||
// (name in cfg, feature, function to check if the feature is enabled)
|
||||
(sym::overflow_checks, sym::cfg_overflow_checks, cfg_fn!(cfg_overflow_checks)),
|
||||
(sym::ub_checks, sym::cfg_ub_checks, cfg_fn!(cfg_ub_checks)),
|
||||
(sym::target_thread_local, sym::cfg_target_thread_local, cfg_fn!(cfg_target_thread_local)),
|
||||
(
|
||||
sym::target_has_atomic_equal_alignment,
|
||||
|
|
|
@ -381,6 +381,8 @@ declare_features! (
|
|||
(unstable, cfg_target_has_atomic_equal_alignment, "1.60.0", Some(93822)),
|
||||
/// Allows `cfg(target_thread_local)`.
|
||||
(unstable, cfg_target_thread_local, "1.7.0", Some(29594)),
|
||||
/// Allows the use of `#[cfg(ub_checks)` to check if UB checks are enabled.
|
||||
(unstable, cfg_ub_checks, "CURRENT_RUSTC_VERSION", Some(123499)),
|
||||
/// Allow conditional compilation depending on rust version
|
||||
(unstable, cfg_version, "1.45.0", Some(64796)),
|
||||
/// Allows to use the `#[cfi_encoding = ""]` attribute.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue