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-02-09 20:07:42 -0500
committerBen Kimock <kimockb@gmail.com>2024-02-19 20:38:09 -0500
commit581e171773a0e4bf398d4b7df0e30a7aae627f0b (patch)
treed7818ddb29570f9213dc65e3f500eaf205cd30a7 /library/core/src/ptr/alignment.rs
parent0395fa387ad4de63ea1b36703ca0d65017b8c2dc (diff)
downloadrust-581e171773a0e4bf398d4b7df0e30a7aae627f0b.tar.gz
rust-581e171773a0e4bf398d4b7df0e30a7aae627f0b.zip
Convert debug_assert_nounwind to intrinsics::debug_assertions
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"