You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use derive_more::Display;#[derive(Debug,Display)]pubenumTest{#[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, ...).
The text was updated successfully, but these errors were encountered:
aborgna-q
changed the title
Hide deprecation warnings inside Display derive expansion
Hide deprecation warnings inside derive expansions
Oct 21, 2024
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
, ...).The text was updated successfully, but these errors were encountered: