We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#[serde(rename)]
#[serde(alias)]
Both attributes does nothing and just confuse users:
#[derive(serde::Deserialize)] #[serde(untagged)] pub enum Untagged { #[serde(rename = "unit", alias = "_1")] Unit, #[serde(rename = "newtype", alias = "_2")] Newtype(u32), #[serde(rename = "tuple", alias = "_3")] Tuple(u32, u32), #[serde(rename = "struct", alias = "_4")] Struct { a: u32 }, }
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=bc78b6a4d132a2c255db120036d7fa42
Instead an error should be emitted that such attributes (maybe some other too!) does nothing and not allowed for untagged enums.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Both attributes does nothing and just confuse users:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=bc78b6a4d132a2c255db120036d7fa42
Instead an error should be emitted that such attributes (maybe some other too!) does nothing and not allowed for untagged enums.
The text was updated successfully, but these errors were encountered: