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

Correctly process flatten fields in enum variants #2567

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented Aug 10, 2023

Store has_flatten mark in the Variant attributes and use it instead of attr::Container::has_flatten() in methods that can be called for variants.

Fixes #1904, fixes #2565

Mingun and others added 3 commits August 11, 2023 02:50
failures (1):
    regression::issue2565::simple_variant
Currently panics in derive
- Fix incorrect deserialization of variants that doesn't contain flatten field when other contains
- Fix a panic when deriving `Deserialize` for an enum with tuple and struct with flatten field

Fixes (2):
    regression::issue2565::simple_variant
    regression::issue1904 (compilation)
@Mingun
Copy link
Contributor Author

Mingun commented Sep 17, 2023

@dtolnay , when you could look at this? This bugs becomes annoying...

@Mingun
Copy link
Contributor Author

Mingun commented Mar 3, 2024

@dtolnay, @oli-obk, can you give some feedback?

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