Skip to content

Commit a93e37a

Browse files
RalfJungCentril
andauthored
Apply suggestions from code review
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
1 parent 6a6b017 commit a93e37a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/behavior-considered-undefined.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ code.
4444
* A `!` (all values are invalid for this type).
4545
* [Uninitialized memory][undef] in the value of an integer (`i*`/`u*`),
4646
floating point value (`f*`), or raw pointer.
47-
* A dangling or unaligned reference or `Box`, or one that points to an invalid value.
47+
* A reference or `Box<T>` that is dangling, unaligned, or points to an invalid value.
4848
* Invalid metadata in a wide reference, `Box`, or raw pointer:
4949
* `dyn Trait` metadata is invalid if it is not a pointer to a vtable for
50-
`Trait` that matches the actual dynamic trait the reference points to.
50+
`Trait` that matches the actual dynamic trait the pointer or reference points to.
5151
* Slice metadata is invalid if if the length is not a valid `usize`
5252
(i.e., it must not be read from uninitialized memory).
5353
* Non-UTF-8 byte sequences in a `str`.
5454
* Invalid values for a type with a custom definition of invalid values, such
55-
as a `NonNull` that is null. (Requesting custom invalid values is an
55+
as a `NonNull<T>` that is null. (Requesting custom invalid values is an
5656
unstable feature, but some stable libstd types, like `NonNull`, make use of
5757
it.)
5858

@@ -67,7 +67,7 @@ points to are part of the same allocation (so in particular they all have to be
6767
part of *some* allocation). The span of bytes it points to is determined by the
6868
pointer value and the size of the pointee type. As a consequence, if the span is
6969
empty, "dangling" is the same as "non-null". Note that slices point to their
70-
entire range, so it is very important that the length metadata is never too
70+
entire range, so it is important that the length metadata is never too
7171
large. In particular, allocations and therefore slices cannot be bigger than
7272
`isize::MAX` bytes.
7373

0 commit comments

Comments
 (0)