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

Suppress warning when deriving [De]Serialize_repr on deprecated types #29

Closed
domenicquirl opened this issue Apr 8, 2024 · 0 comments · Fixed by #30
Closed

Suppress warning when deriving [De]Serialize_repr on deprecated types #29

domenicquirl opened this issue Apr 8, 2024 · 0 comments · Fixed by #30

Comments

@domenicquirl
Copy link

Currently (as of version 0.1.18) using serde_repr derives on a deprecated enum or an enum with deprecated variants causes deprecation warnings to be emitted from the macro:

#[deprecated]
#[derive(Debug, Clone, Copy, Serialize_repr, Deserialize_repr)]
enum Foo {   // use of deprecated enum `Foo`
    Bar,     // use of deprecated enum variant `Foo::Bar`
    Baz,     // use of deprecated enum variant `Foo::Baz`
}

This can be worked around in the same way as serde-rs/serde#2195, but would be better handled by the macro taking this into account.

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 a pull request may close this issue.

1 participant