Skip to content

Define field, element #933

Open
Open
@Havvy

Description

@Havvy

We use "field" and "element" quite a lot but don't actually define what they are. We need to define them.

We could get rid of the use of "element" (in arrays and tuples) as a separate term and call them fields everywhere. AFAIK, there's no distinction between the two term except where we currently use them.

We may also want to introduce a term "active field" for whether or not the field can be accessed and padding bytes are padding bytes for the containing type. For example of why this would be useful, how do we describe padding of the field/element in A only exists when the value has the A discriminant?

#[repr(u8)]
enum Enum {
    A((u64, u32)),
    B(u128),
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    New ContentMissing features or aspects of language not currently documented.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions