use derive_more::Display;
#[derive(Debug, Display)]
pub enum Test {
#[deprecated(note = "this is deprecated")]
B { x: usize },
}
Compiling this produces a warning:
warning: use of deprecated field `derive_more_deprecate::Test::B::x`: this is deprecated
--> src/derive_more_deprecate.rs:5:9
|
5 | B { x: usize },
| ^
Adding #[allow(deprecated)] does not help since the attribute does not get added to the impl Display.
This also happens with other derive macros (From, Error, ...).
Consider the following example:
Compiling this produces a warning:
Adding
#[allow(deprecated)]
does not help since the attribute does not get added to theimpl Display
.This also happens with other derive macros (
From
,Error
, ...).