diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-02-09 20:07:42 -0500 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2024-02-19 20:38:09 -0500 |
| commit | 581e171773a0e4bf398d4b7df0e30a7aae627f0b (patch) | |
| tree | d7818ddb29570f9213dc65e3f500eaf205cd30a7 /library/core/src/ptr/alignment.rs | |
| parent | 0395fa387ad4de63ea1b36703ca0d65017b8c2dc (diff) | |
| download | rust-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.rs | 1 |
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" |
