Skip to content

repr ignores enum variant field names #8930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thestinger opened this issue Sep 2, 2013 · 2 comments
Closed

repr ignores enum variant field names #8930

thestinger opened this issue Sep 2, 2013 · 2 comments

Comments

@thestinger
Copy link
Contributor

enum Foo { Bar { x: int } }
Bar { x: 5 }

prints as Bar(5)

@emberian
Copy link
Member

Visiting for triage. Still an issue.
Updated testcase:

#[feature(struct_variant)];

enum Foo {
    Bar { x: int }
}

fn main() {
    println!("{:?}", Bar { x: 5 });
}

@thestinger
Copy link
Contributor Author

Reflection has been removed.

flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 16, 2022
fix(manual_find_map and manual_filter_map): check clone method

close rust-lang#8920

Added conditional branching when the clone method is used.

Thank you in advance.

---

changelog: check `clone()` and other variant preserving methods in [`manual_find_map`] and [`manual_filter_map`]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants