about summary refs log tree commit diff
path: root/library/core/src/ptr/alignment.rs
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2024-08-23 18:26:45 -0400
committerBen Kimock <kimockb@gmail.com>2024-08-23 18:26:45 -0400
commit5d98d2052923c116a0493528d41d656e9b29c92f (patch)
tree1fe2b99d6c531c2bb28106de861003ee514cf33d /library/core/src/ptr/alignment.rs
parenteef00c8be8d92478e181011f24946cca3d468f0a (diff)
downloadrust-5d98d2052923c116a0493528d41d656e9b29c92f.tar.gz
rust-5d98d2052923c116a0493528d41d656e9b29c92f.zip
Enable Alignment::new_unchecked precondition check
Diffstat (limited to 'library/core/src/ptr/alignment.rs')
-rw-r--r--library/core/src/ptr/alignment.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs
index 68fce3960c7..19fe03d57cc 100644
--- a/library/core/src/ptr/alignment.rs
+++ b/library/core/src/ptr/alignment.rs
@@ -1,5 +1,4 @@
 use crate::num::NonZero;
-#[cfg(debug_assertions)]
 use crate::ub_checks::assert_unsafe_precondition;
 use crate::{cmp, fmt, hash, mem, num};
 
@@ -77,7 +76,6 @@ impl Alignment {
     #[rustc_const_unstable(feature = "ptr_alignment_type", issue = "102070")]
     #[inline]
     pub const unsafe fn new_unchecked(align: usize) -> Self {
-        #[cfg(debug_assertions)]
         assert_unsafe_precondition!(
             check_language_ub,
             "Alignment::new_unchecked requires a power of two",