about summary refs log tree commit diff
path: root/library/core/src/ptr/alignment.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/ptr/alignment.rs')
-rw-r--r--library/core/src/ptr/alignment.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs
index d2422bb80ae..6dfecb5a826 100644
--- a/library/core/src/ptr/alignment.rs
+++ b/library/core/src/ptr/alignment.rs
@@ -76,6 +76,7 @@ impl Alignment {
     #[rustc_const_unstable(feature = "ptr_alignment_type", issue = "102070")]
     #[inline]
     pub const unsafe fn new_unchecked(align: usize) -> Self {
+        #[cfg(debug_assertions)]
         crate::panic::debug_assert_nounwind!(
             align.is_power_of_two(),
             "Alignment::new_unchecked requires a power of two"