File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2949,15 +2949,15 @@ pub const unsafe fn typed_swap<T>(x: *mut T, y: *mut T) {
29492949/// sysroot which is built without ub_checks but with `#[rustc_preserve_ub_checks]`.
29502950/// For code that gets monomorphized in the user crate (i.e., generic functions and functions with
29512951/// `#[inline]`), gating assertions on `ub_checks()` rather than `cfg!(ub_checks)` means that
2952- /// assertions are enabled whenever the *user crate* has UB checks enabled. However if the
2952+ /// assertions are enabled whenever the *user crate* has UB checks enabled. However, if the
29532953/// user has UB checks disabled, the checks will still get optimized out. This intrinsic is
29542954/// primarily used by [`ub_checks::assert_unsafe_precondition`].
29552955#[ rustc_const_unstable( feature = "const_ub_checks" , issue = "none" ) ]
29562956#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
29572957#[ inline( always) ]
29582958#[ rustc_intrinsic]
29592959pub const fn ub_checks ( ) -> bool {
2960- cfg ! ( debug_assertions )
2960+ cfg ! ( ub_checks )
29612961}
29622962
29632963/// Allocates a block of memory at compile time.
You can’t perform that action at this time.
0 commit comments