We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1bbbbb commit 31bed92Copy full SHA for 31bed92
library/core/src/ptr/alignment.rs
@@ -16,7 +16,7 @@ use crate::{cmp, fmt, hash, mem, num};
16
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
17
#[derive(Copy, Clone, PartialEq, Eq)]
18
#[repr(transparent)]
19
-#[invariant(self.as_usize().is_power_of_two())]
+#[invariant(self.0.is_power_of_two())] // uses .0 instead of .as_usize() to permit proving as_usize
20
pub struct Alignment(AlignmentEnum);
21
22
// Alignment is `repr(usize)`, but via extra steps.
0 commit comments