File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 5151 ` Trait ` that matches the actual dynamic trait the pointer or reference points to.
5252 * Slice metadata is invalid if the length is not a valid ` usize `
5353 (i.e., it must not be read from uninitialized memory).
54- * Non-UTF-8 byte sequences in a ` str ` .
5554 * Invalid values for a type with a custom definition of invalid values.
5655 In the standard library, this affects [ ` NonNull<T> ` ] and [ ` NonZero* ` ] .
5756
@@ -63,8 +62,8 @@ points to are part of the same allocation (so in particular they all have to be
6362part of * some* allocation). The span of bytes it points to is determined by the
6463pointer value and the size of the pointee type (using ` size_of_val ` ). As a
6564consequence, if the span is empty, "dangling" is the same as "non-null". Note
66- that slices point to their entire range, so it is important that the length
67- metadata is never too large. In particular, allocations and therefore slices
65+ that slices and strings point to their entire range, so it is important that the length
66+ metadata is never too large. In particular, allocations and therefore slices and strings
6867cannot be bigger than ` isize::MAX ` bytes.
6968
7069> ** Note** : Undefined behavior affects the entire program. For example, calling
You can’t perform that action at this time.
0 commit comments