Unexpected "deprecated" warning when derive attribute for enum and enum has deprecated items #38832
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Let's consider the following situation: there is a enumeration in which have an deprecated element. This enumeration derives implementation of some traits. In such case rustc generates deprecation warning, but actually deprecated item never used.
As in this case there is no control over the generated code, I consider that the warning shouldn't be. It is impossible to suppress warning also because the element is marked deprecated for the reason that he shouldn't be used obviously. If to suppress him, then meaning to mark a enumaration element as deprecated is lost.
Example of problem:
Output:
play-pen
The text was updated successfully, but these errors were encountered: