dtolnay/serde-repr

Suppress warning when deriving `[De]Serialize_repr` on deprecated types

domenicquirl opened this issue · 0 comments

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.