Auto merge of #129488 - saethlin:alignment-precondition, r=workingjub… · patricklam/verify-rust-std@4d22c1c (original) (raw)

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
1 1 use crate::num::NonZero;
2 -#[cfg(debug_assertions)]
3 2 use crate::ub_checks::assert_unsafe_precondition;
4 3 use crate::{cmp, fmt, hash, mem, num};
5 4
@@ -77,7 +76,6 @@ impl Alignment {
77 76 #[rustc_const_unstable(feature = "ptr_alignment_type", issue = "102070")]
78 77 #[inline]
79 78 pub const unsafe fn new_unchecked(align: usize) -> Self {
80 -#[cfg(debug_assertions)]
81 79 assert_unsafe_precondition!(
82 80 check_language_ub,
83 81 "Alignment::new_unchecked requires a power of two",