Skip to content

Commit 31e6146

Browse files
authored
Clarify Unalign ABI guarantees (#168)
Closes #164
1 parent 83287e0 commit 31e6146

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,9 +1139,10 @@ mod simd {
11391139
/// A type with no alignment requirement.
11401140
///
11411141
/// An `Unalign` wraps a `T`, removing any alignment requirement. `Unalign<T>`
1142-
/// has the same size and ABI as `T`, but not necessarily the same alignment.
1143-
/// This is useful if a type with an alignment requirement needs to be read from
1144-
/// a chunk of memory which provides no alignment guarantees.
1142+
/// has the same size and bit validity as `T`, but not necessarily the same
1143+
/// alignment [or ABI]. This is useful if a type with an alignment requirement
1144+
/// needs to be read from a chunk of memory which provides no alignment
1145+
/// guarantees.
11451146
///
11461147
/// Since `Unalign` has no alignment requirement, the inner `T` may not be
11471148
/// properly aligned in memory. There are four ways to access the inner `T`:
@@ -1155,6 +1156,7 @@ mod simd {
11551156
/// - (where `T: Unaligned`) infallibly by reference, using [`Deref::deref`] or
11561157
/// [`DerefMut::deref_mut`]
11571158
///
1159+
/// [or ABI]: https://github.com/google/zerocopy/issues/164
11581160
/// [`get`]: Unalign::get
11591161
/// [`into_inner`]: Unalign::into_inner
11601162
/// [`try_deref`]: Unalign::try_deref

0 commit comments

Comments
 (0)