Skip to content

Commit

Permalink
Part of #21
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokathor committed Jul 24, 2020
1 parent 1be7a90 commit b531b05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/transparent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use super::*;
///
/// 3. The `Wrapper` may not impose additional alignment requirements over
/// `Wrapped`.
/// - Note: this is currently guaranteed by repr(transparent), but there
/// have been discussions of lifting it, so it's stated here explictly.
/// - Note: this is currently guaranteed by `repr(transparent)`, but there
/// have been discussions of lifting it, so it's stated here explicitly.
///
/// 4. The `wrap_ref` and `wrap_mut` functions on `TransparentWrapper` may not
/// be overridden.
Expand Down Expand Up @@ -131,3 +131,5 @@ pub unsafe trait TransparentWrapper<Wrapped: ?Sized> {
}
}
}

unsafe impl<T> TransparentWrapper<T> for core::num::Wrapping<T> {}

0 comments on commit b531b05

Please sign in to comment.