Skip to content

Removing ambiguity in type-layout.md #911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2020
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
12 changes: 6 additions & 6 deletions src/type-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ array with that item type including alignment padding. The size of a value is
always a multiple of its alignment. The size of a value can be checked with the
[`size_of_val`] function.

Types where all values have the same size and alignment known at compile time
implement the [`Sized`] trait and can be checked with the [`size_of`] and
[`align_of`] functions. Types that are not [`Sized`] are known as [dynamically
sized types]. Since all values of a `Sized` type share the same size and
alignment, we refer to those shared values as the size of the type and the
alignment of the type respectively.
Types where all values have the same size and alignment, and both are known at
compile time, implement the [`Sized`] trait and can be checked with the
[`size_of`] and [`align_of`] functions. Types that are not [`Sized`] are known
as [dynamically sized types]. Since all values of a `Sized` type share the same
size and alignment, we refer to those shared values as the size of the type and
the alignment of the type respectively.

## Primitive Data Layout

Expand Down