Rollup merge of #88915 - joshlf:patch-4, r=kennytm
`Wrapping<T>` has the same layout and ABI as `T`
This commit is contained in:
commit
cad1efae57
1 changed files with 4 additions and 0 deletions
|
@ -32,6 +32,10 @@ use crate::ops::{Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign};
|
||||||
///
|
///
|
||||||
/// assert_eq!(u32::MAX, (zero - one).0);
|
/// 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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]
|
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue