Skip to content

Commit 426f06f

Browse files
committed
Be more precise about why references need to be non-null and aligned
1 parent 579099a commit 426f06f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3873,7 +3873,7 @@ unsafe impl<'a, T> TrustedRandomAccess for ExactChunksMut<'a, T> {
38733873
/// valid for `len` elements, nor whether the lifetime inferred is a suitable
38743874
/// lifetime for the returned slice.
38753875
///
3876-
/// `data` must be non-null and aligned, even for zero-length slices. The
3876+
/// `data` must be non-null and aligned, even for zero-length slices. One
38773877
/// reason for this is that enum layout optimizations may rely on references
38783878
/// (including slices of any length) being aligned and non-null to distinguish
38793879
/// them from other data. You can obtain a pointer that is usable as `data`

0 commit comments

Comments
 (0)