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 e6280cd + d7c692a commit 41e51f6Copy full SHA for 41e51f6
core/src/ptr/alignment.rs
@@ -146,6 +146,22 @@ impl TryFrom<usize> for Alignment {
146
}
147
148
149
+#[unstable(feature = "ptr_alignment_type", issue = "102070")]
150
+impl From<Alignment> for NonZeroUsize {
151
+ #[inline]
152
+ fn from(align: Alignment) -> NonZeroUsize {
153
+ align.as_nonzero()
154
+ }
155
+}
156
+
157
158
+impl From<Alignment> for usize {
159
160
+ fn from(align: Alignment) -> usize {
161
+ align.as_usize()
162
163
164
165
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
166
impl cmp::Ord for Alignment {
167
#[inline]
0 commit comments