Skip to content

Clarify that More is author-defined in "Layout"? #304

@Vectornaut

Description

@Vectornaut

Reading the example definition

enum Link {
    Empty,
    More(Box<Node>),
}

in the "Basic Data Layout" section, it took me some effort to figure out that More is an author-defined type name, rather than a some kind of Rust built-in. I don't know why this definition confused me, even though the syntactically similar definition

pub enum List {
    Empty,
    Elem(i32, List),
}

didn't, but this forum post shows that at least one other person was confused in the same way. I have about two months of Rust experience, which includes using built-in enums of this form (like Option and Error), but not defining any that I can recall.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions