Skip to content

Commit

Permalink
Further remove the "default" representation
Browse files Browse the repository at this point in the history
This updates some more references to the "default" representation and
instead refers to it directly as the "Rust" representation. This is
intended to more consistently refer to the same concept.
  • Loading branch information
ehuss committed Oct 30, 2024
1 parent 4b618dc commit c0b81df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/items/enumerations.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ let z = StructLike { value: 123 }; // Struct expression.
Each enum instance has a _discriminant_: an integer logically associated to it
that is used to determine which variant it holds.

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 @@ -333,14 +333,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
2 changes: 1 addition & 1 deletion src/type-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ 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>
Expand Down

0 comments on commit c0b81df

Please sign in to comment.