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

Allow different reprs to still work #687

Merged
merged 13 commits into from
Jan 28, 2025
Merged

Conversation

jsdw
Copy link
Contributor

@jsdw jsdw commented Jan 27, 2025

Don't output suffixes when generating the index array in the const fun, to avoid the suffix types from conflicting with the declared type of the index array (usize) which leads to compile errors when indexes are from discriminants and are not usizes.

Should fix #686

@jsdw jsdw marked this pull request as ready for review January 27, 2025 18:02
@serban300
Copy link
Contributor

@jsdw please, can you also update the version to 3.7.2 ?

@jsdw
Copy link
Contributor Author

jsdw commented Jan 27, 2025

Done!

I have to head out now but if it's failing tests or anything I'll sort it out later or in the morning!

derive/src/utils.rs Outdated Show resolved Hide resolved
derive/src/utils.rs Outdated Show resolved Hide resolved
@serban300 serban300 merged commit a0b393b into master Jan 28, 2025
17 checks passed
@jsdw jsdw deleted the jsdw-fix-discriminant-idx branch January 28, 2025 15:55
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

Successfully merging this pull request may close these issues.

Derive encode/decode compile error[E0308]: mismatched types
4 participants