Skip to content
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

Remove EnumItemDiscriminant class #3340

Open
CohenArthur opened this issue Jan 2, 2025 · 5 comments · May be fixed by #3355
Open

Remove EnumItemDiscriminant class #3340

CohenArthur opened this issue Jan 2, 2025 · 5 comments · May be fixed by #3355

Comments

@CohenArthur
Copy link
Member

Per the Rust reference: https://doc.rust-lang.org/reference/items/enumerations.html

Meaning that all possible enum items (identifiers, structs or tuples) can have a discriminant, even in 1.49 - however, the feature was still experimental back then.

Still, we need to remove the EnumItemDiscriminant class and instead add an optional std::unique_ptr<Expr> to the base EnumItem class, for all enum items to use it if required.

Eventually we'll also need to fix the parser to handle this

@varun-r-mallya
Copy link

Hey, I think I'd like to work on this. Can you please provide resources on what I can do with this as well as which files I might have to work on along with a slightly more detailed description of what I might need to do ?
Thanks for helping me out.
@CohenArthur

@CohenArthur
Copy link
Member Author

hi @varun-r-mallya, sorry about this another contributor already asked to work on the issue beforehand on Zulip. apologies. if you want, you can do the same thing in our HIR and remove the HIR::EnumItemDiscriminant class

@saeitoshi-10
Copy link

hi @CohenArthur i would like to contribute to this issue

@varun-r-mallya
Copy link

hi @varun-r-mallya, sorry about this another contributor already asked to work on the issue beforehand on Zulip. apologies. if you want, you can do the same thing in our HIR and remove the HIR::EnumItemDiscriminant class

Sure. Can I have details on that and it's corresponding issue as well ?

@CohenArthur
Copy link
Member Author

@varun-r-mallya there isn't much more to say haha. have a look in the code for the class, find it, and then just delete it. this will cause a bunch of compilation issues and you'll need to fix them as well. if you are still having trouble once you're done with that feel free to ask more questions

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

Successfully merging a pull request may close this issue.

3 participants