Skip to content
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

Update some "default" representation references #1667

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/items/enumerations.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Each enum instance has a _discriminant_: an integer logically associated to it
that is used to determine which variant it holds.

r[items.enum.discriminant.repr-rust]
Under the [default representation], the discriminant is interpreted as
Under the [`Rust` representation], the discriminant is interpreted as
an `isize` value. However, the compiler is allowed to use a smaller type (or
another means of distinguishing variants) in its actual memory layout.

Expand Down Expand Up @@ -378,14 +378,14 @@ enum E {
[`C` representation]: ../type-layout.md#the-c-representation
[call expression]: ../expressions/call-expr.md
[constant expression]: ../const_eval.md#constant-expressions
[default representation]: ../type-layout.md#the-default-representation
[enumerated type]: ../types/enum.md
[Field-less enums]: #field-less-enum
[IDENTIFIER]: ../identifiers.md
[never type]: ../types/never.md
[numeric cast]: ../expressions/operator-expr.md#semantics
[path expression]: ../expressions/path-expr.md
[primitive representation]: ../type-layout.md#primitive-representations
[`Rust` representation]: ../type-layout.md#the-rust-representation
[struct expression]: ../expressions/struct-expr.md
[struct]: structs.md
[type namespace]: ../names/namespaces.md
Expand Down
5 changes: 3 additions & 2 deletions src/type-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,11 @@ struct AlignedStruct {
r[layout.repr.inter-field]
The representation of a type can change the padding between fields, but does
not change the layout of the fields themselves. For example, a struct with a
`C` representation that contains a struct `Inner` with the default
`C` representation that contains a struct `Inner` with the `Rust`
representation will not change the layout of `Inner`.

### <a id="the-default-representation"></a> The `Rust` Representation
<a id="the-default-representation"></a>
### The `Rust` Representation

r[layout.repr.rust]

Expand Down