Skip to content

document common enum fields #3338

Closed
Closed
@jesse99

Description

@jesse99
Contributor

Commit 5c9c9a6 talks about something called common enum fields and includes the following wacky rust example:

enum Foo {
    struct {
        x: int;
        y: int;
    }

    Bar(int),
    Baz(int)
}

Don't see this documented anywhere.

Activity

jesse99

jesse99 commented on Nov 18, 2012

@jesse99
ContributorAuthor

Wanted to document this but I have no idea what it's for or how you'd go about initializing x and y. Fwiw I searched all of src using:
enum \s+ [a-zA-Z0-9]+ \s* { \s* struct \s* {
and the only place that syntax seems to be used is the one trivial example from the original commit.

nikomatsakis

nikomatsakis commented on Nov 20, 2012

@nikomatsakis
Contributor

I think we've decided not to support these.

catamorphism

catamorphism commented on Dec 7, 2012

@catamorphism
Contributor

Closing since we're not supporting them.

added 2 commits that reference this issue on May 2, 2020

Auto merge of rust-lang#5448 - Emerentius:update_new_ret_no_self_docs…

added a commit that references this issue on Mar 3, 2024

Auto merge of rust-lang#3338 - RalfJung:more-tracking-and-threads, r=…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nikomatsakis@jesse99@catamorphism

        Issue actions

          document common enum fields · Issue #3338 · rust-lang/rust