-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
we can combine struct and enum #119320
Comments
Structs and enums are related but still conceptually distinct features. I would recommend reading up on Chapter 5: Structs and Chapter 6: Enum of the book. struct S { f: T } can be represented via enum E { S { f: T } } Except that in Rust, you would now need to use pattern matching to access the field |
In the future, please consider opening a thread over at https://internals.rust-lang.org/ or https://rust-lang.zulipchat.com/ first for questions about language design and/or language proposals. I also recommend you to try out support forums like Discord first. This issue tracker is mostly for bugs found in the Rust compiler. |
Closing as invalid. |
hello ... I love ....
I am new and beginner rust developer when I learn enum and struct I think we can combine struct and enum to just struct and delete enum for ever and just have struct...
The text was updated successfully, but these errors were encountered: