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

Attempt to initialize static enums #173

Open
UncombedCoconut opened this issue Jan 13, 2018 · 0 comments
Open

Attempt to initialize static enums #173

UncombedCoconut opened this issue Jan 13, 2018 · 0 comments

Comments

@UncombedCoconut
Copy link

Input: static enum AB {A, B} ab;
Output: "Corrode doesn't handle this yet: { }".
Proposed output: ..., static mut ab : AB = _AB::A;.

(This happened more naturally in the wild: static instance of a struct, one of whose members was an enum type.)

Related situations: If there's no zero value (static enum AB {A=1, B=2} ab;) I suppose an error is better than making one up. If there are multiple, it's better to worry after Corrode has a way to avoid Rust errors like "discriminant value 0i32 already exists".

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

1 participant