Skip to content

Commit 57c850c

Browse files
committed
clarify, also cover Box
1 parent 5e082af commit 57c850c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/what-unsafe-does.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ language cares about is preventing the following things:
2929
* a null `fn` pointer
3030
* a `char` outside the ranges [0x0, 0xD7FF] and [0xE000, 0x10FFFF]
3131
* a `!` (all values are invalid for this type)
32-
* a reference that is dangling, unaligned, points to an invalid value, or
33-
that has invalid metadata (if wide)
32+
* a reference/`Box` that is dangling, unaligned, points to an invalid value.
33+
* a wide reference, `Box` or raw pointer that has invalid metadata:
3434
* slice metadata is invalid if the slice has a total size larger than
3535
`isize::MAX` bytes in memory
3636
* `dyn Trait` metadata is invalid if it is not a pointer to a vtable for
3737
`Trait` that matches the actual dynamic trait the reference points to
38-
* a wide raw pointer that has invalid metadata (see above)
3938
* a `str` that isn't valid UTF-8
4039
* an integer (`i*`/`u*`), floating point value (`f*`), or raw pointer read from
4140
[uninitialized memory][]

0 commit comments

Comments
 (0)