about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-09-15 14:57:02 -0700
committerGitHub <noreply@github.com>2021-09-15 14:57:02 -0700
commitcad1efae578da9b2a4d48fe2973fd8728d04515a (patch)
tree087c414e1b456f08007fcb41e8f6482126d32906
parente1acdf51bf798bd9a160eb96e48d66f5e5bddd37 (diff)
parent1053a5bb0ff9f781cc1fa0385ce699fe49ee2ad2 (diff)
downloadrust-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.rs4
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)]