Skip to content

Commit ab1c05f

Browse files
committed
break apart the bulleted list
1 parent a0d7549 commit ab1c05f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

reference/src/glossary.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ However, `head` and `tail` do not alias each other: `head` points to the first
3232
byte of `u` and `tail` points to the other seven bytes of `u` after it. Both `head`
3333
and `tail` alias `s`, any overlap is sufficient to count as an alias.
3434

35-
* The span of a pointer or reference is the size of the value being pointed to or referenced.
35+
The span of a pointer or reference is the size of the value being pointed to or referenced.
36+
37+
Depending on the type, you can determine the size as follows:
38+
3639
* For a type `T` that is [`Sized`](https://doc.rust-lang.org/core/marker/trait.Sized.html)
3740
The span length of a pointer or reference to `T` is found with `size_of::<T>()`.
3841
* When `T` is not `Sized` the story is a little tricker:
@@ -41,7 +44,8 @@ and `tail` alias `s`, any overlap is sufficient to count as an alias.
4144
* If you have a pointer `p` you must unsafely convert that to a reference before
4245
you can use `size_of_val`. There is not currently a safe way to determine the
4346
span of a pointer to an unsized type.
44-
* The Data Layout chapter also has more information on the sizes of different types.
47+
48+
The Data Layout chapter also has more information on the sizes of different types.
4549

4650
One interesting side effect of these rules is that references and pointers to
4751
Zero Sized Types _never_ alias each other, because their span length is always 0

0 commit comments

Comments
 (0)