@@ -2704,17 +2704,17 @@ pub const unsafe fn typed_swap<T>(x: *mut T, y: *mut T) {
2704
2704
}
2705
2705
2706
2706
/// Returns whether we should perform some UB-checking at runtime. This eventually evaluates to
2707
- /// `cfg!(debug_assertions )`, but behaves different from `cfg!` when mixing crates built with different
2708
- /// flags: if the crate has debug assertions enabled or carries the `#[rustc_preserve_ub_checks]`
2707
+ /// `cfg!(ub_checks )`, but behaves different from `cfg!` when mixing crates built with different
2708
+ /// flags: if the crate has UB checks enabled or carries the `#[rustc_preserve_ub_checks]`
2709
2709
/// attribute, evaluation is delayed until monomorphization (or until the call gets inlined into
2710
2710
/// a crate that does not delay evaluation further); otherwise it can happen any time.
2711
2711
///
2712
- /// The common case here is a user program built with debug_assertions linked against the distributed
2713
- /// sysroot which is built without debug_assertions but with `#[rustc_preserve_ub_checks]`.
2712
+ /// The common case here is a user program built with ub_checks linked against the distributed
2713
+ /// sysroot which is built without ub_checks but with `#[rustc_preserve_ub_checks]`.
2714
2714
/// For code that gets monomorphized in the user crate (i.e., generic functions and functions with
2715
- /// `#[inline]`), gating assertions on `ub_checks()` rather than `cfg!(debug_assertions )` means that
2716
- /// assertions are enabled whenever the *user crate* has debug assertions enabled. However if the
2717
- /// user has debug assertions disabled, the checks will still get optimized out. This intrinsic is
2715
+ /// `#[inline]`), gating assertions on `ub_checks()` rather than `cfg!(ub_checks )` means that
2716
+ /// assertions are enabled whenever the *user crate* has UB checks enabled. However if the
2717
+ /// user has UB checks disabled, the checks will still get optimized out. This intrinsic is
2718
2718
/// primarily used by [`ub_checks::assert_unsafe_precondition`].
2719
2719
#[ rustc_const_unstable( feature = "const_ub_checks" , issue = "none" ) ]
2720
2720
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
0 commit comments