paritytech/parity-scale-codec

Derive `Encode` and `Decode` don't respect `#[deprecated]`

Closed this issue · 0 comments

This compiles without warning:

#[derive(Debug, Clone, Copy)]
enum MyEnum {
  VariantA,
  #[deprecated]
  VariantB,
}

This compiles with a warning

warning: use of deprecated unit variant `VariantB`
use codec::Encode;

#[derive(Debug, Clone, Copy, Encode)]
enum MyEnum {
  VariantA,
  #[deprecated]
  VariantB,
}