Skip to content

Commit

Permalink
Enable Alignment::new_unchecked precondition check
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Aug 23, 2024
1 parent eef00c8 commit 5d98d20
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions library/core/src/ptr/alignment.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 5d98d20

Please sign in to comment.