Skip to content

Commit cad1efa

Browse files
authored
Rollup merge of #88915 - joshlf:patch-4, r=kennytm
`Wrapping<T>` has the same layout and ABI as `T`
2 parents e1acdf5 + 1053a5b commit cad1efa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/core/src/num/wrapping.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ use crate::ops::{Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign};
3232
///
3333
/// assert_eq!(u32::MAX, (zero - one).0);
3434
/// ```
35+
///
36+
/// # Layout
37+
///
38+
/// `Wrapping<T>` is guaranteed to have the same layout and ABI as `T`.
3539
#[stable(feature = "rust1", since = "1.0.0")]
3640
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]
3741
#[repr(transparent)]

0 commit comments

Comments
 (0)