Skip to content

Commit 1bd918c

Browse files
committed
add string slice layout to type layout section
1 parent 49d6c3c commit 1bd918c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/type-layout.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ Slices have the same layout as the section of the array they slice.
8686
> Note: This is about the raw `[T]` type, not pointers (`&[T]`, `Box<[T]>`,
8787
> etc.) to slices.
8888
89+
## `str` Layout
90+
String slices are a UTF-8 representation of characters that have the same layout as slices of type `[u8]`.
91+
8992
## Tuple Layout
9093

9194
Tuples do not have any guarantees about their layout.

0 commit comments

Comments
 (0)