Skip to content

Commit

Permalink
Rollup merge of rust-lang#88915 - joshlf:patch-4, r=kennytm
Browse files Browse the repository at this point in the history
`Wrapping<T>` has the same layout and ABI as `T`
  • Loading branch information
Manishearth authored Sep 14, 2021
2 parents 78d849e + 1053a5b commit e8741a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/core/src/num/wrapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit e8741a3

Please sign in to comment.