We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c6db1ca + 5d98d20 commit 3f121b9Copy full SHA for 3f121b9
1 file changed
library/core/src/ptr/alignment.rs
@@ -1,5 +1,4 @@
1
use crate::num::NonZero;
2
-#[cfg(debug_assertions)]
3
use crate::ub_checks::assert_unsafe_precondition;
4
use crate::{cmp, fmt, hash, mem, num};
5
@@ -77,7 +76,6 @@ impl Alignment {
77
76
#[rustc_const_unstable(feature = "ptr_alignment_type", issue = "102070")]
78
#[inline]
79
pub const unsafe fn new_unchecked(align: usize) -> Self {
80
- #[cfg(debug_assertions)]
81
assert_unsafe_precondition!(
82
check_language_ub,
83
"Alignment::new_unchecked requires a power of two",
0 commit comments