mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Wrapping<T>
has the same layout and ABI as T
This commit is contained in:
parent
b0ee4951f0
commit
1053a5bb0f
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user