diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2021-09-15 14:57:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-15 14:57:02 -0700 |
| commit | cad1efae578da9b2a4d48fe2973fd8728d04515a (patch) | |
| tree | 087c414e1b456f08007fcb41e8f6482126d32906 | |
| parent | e1acdf51bf798bd9a160eb96e48d66f5e5bddd37 (diff) | |
| parent | 1053a5bb0ff9f781cc1fa0385ce699fe49ee2ad2 (diff) | |
| download | rust-cad1efae578da9b2a4d48fe2973fd8728d04515a.tar.gz rust-cad1efae578da9b2a4d48fe2973fd8728d04515a.zip | |
Rollup merge of #88915 - joshlf:patch-4, r=kennytm
`Wrapping<T>` has the same layout and ABI as `T`
| -rw-r--r-- | library/core/src/num/wrapping.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/core/src/num/wrapping.rs b/library/core/src/num/wrapping.rs index be6d70320d4..b078cdf5479 100644 --- a/library/core/src/num/wrapping.rs +++ b/library/core/src/num/wrapping.rs @@ -32,6 +32,10 @@ use crate::ops::{Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign}; /// /// assert_eq!(u32::MAX, (zero - one).0); /// ``` +/// +/// # Layout +/// +/// `Wrapping<T>` is guaranteed to have the same layout and ABI as `T`. #[stable(feature = "rust1", since = "1.0.0")] #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)] #[repr(transparent)] |
