Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/dynamically-sized-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ r[dynamic-sized.pointer-types]
* [Pointer types] to <abbr title="dynamically sized types">DSTs</abbr> are sized but have twice the size of pointers to sized types, since they also store *metadata*:
* Pointers to slices store the number of elements; pointers to `str` store the length in bytes.
* Pointers to trait objects store a pointer to a vtable.
* Pointers to a struct or tuple with an [unsized tail] store the same metadata as a pointer to that tail.

r[dynamic-sized.question-sized]
* <abbr title="dynamically sized types">DSTs</abbr> can be provided as type arguments to generic type parameters having the special `?Sized` bound. They can also be used for associated type definitions when the corresponding associated type declaration has a `?Sized` bound. By default, any type parameter or associated type has a `Sized` bound, unless it is relaxed using `?Sized`.
Expand All @@ -30,6 +31,7 @@ The *unsized tail* of a type is the dynamically sized component that the [metada

[metadata]: dynamic-sized.pointer-types
[sized]: special-types-and-traits.md#sized
[unsized tail]: dynamic-sized.tail
[Slices]: types/slice.md
[slice]: types/slice.md
[str]: types/str.md
Expand Down
Loading