Skip to content

Commit

Permalink
Merge pull request #1667 from ehuss/fix-header-link
Browse files Browse the repository at this point in the history
Update some "default" representation references
  • Loading branch information
ehuss authored Nov 5, 2024
2 parents ba3ca44 + 1317a75 commit aefcd5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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

0 comments on commit aefcd5c

Please sign in to comment.