@@ -44,15 +44,15 @@ code.
44
44
* A ` ! ` (all values are invalid for this type).
45
45
* [ Uninitialized memory] [ undef ] in the value of an integer (` i* ` /` u* ` ),
46
46
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.
48
48
* Invalid metadata in a wide reference, ` Box ` , or raw pointer:
49
49
* ` 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.
51
51
* Slice metadata is invalid if if the length is not a valid ` usize `
52
52
(i.e., it must not be read from uninitialized memory).
53
53
* Non-UTF-8 byte sequences in a ` str ` .
54
54
* 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
56
56
unstable feature, but some stable libstd types, like ` NonNull ` , make use of
57
57
it.)
58
58
@@ -67,7 +67,7 @@ points to are part of the same allocation (so in particular they all have to be
67
67
part of * some* allocation). The span of bytes it points to is determined by the
68
68
pointer value and the size of the pointee type. As a consequence, if the span is
69
69
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
71
71
large. In particular, allocations and therefore slices cannot be bigger than
72
72
` isize::MAX ` bytes.
73
73
0 commit comments